From f65779dee8cdd5b3ac67448b3cb7427642908a7d Mon Sep 17 00:00:00 2001 From: Borys Nykytiuk <165832970+BorysNykytiuk@users.noreply.github.com> Date: Mon, 9 Dec 2024 15:02:24 +0200 Subject: [PATCH 01/72] [Telink] Replace SoCs overlays to Zephyr & Update builds to docker version 94 (#36580) * soc: riscv: telink: replace b9x overlay to Zephyr - update pwm channel and funcs according to Zephyr - replace updated overlay info to the Zephyr - delete tlsr9x.overlay file - delete tl3218x.overlay file Signed-off-by: Borys Nykytiuk * [Telink] Update Zephyr HASH to check CI builds * [Telink] Update Zephyr HASH to check CI builds * soc: riscv: telink: replace tl3218 overlay to Zephyr - delete tl3218x.overlay file Signed-off-by: Borys Nykytiuk * [Telink] Update Zephyr revision for CI test * [Telink] Update Zephyr revision for CI test * Update builds to docker version 94 --------- Signed-off-by: Borys Nykytiuk Co-authored-by: Alex Tsitsiura --- .github/workflows/bloat_check.yaml | 2 +- .github/workflows/build.yaml | 10 +-- .github/workflows/chef.yaml | 10 +-- .github/workflows/doxygen.yaml | 2 +- .github/workflows/examples-ameba.yaml | 2 +- .github/workflows/examples-asr.yaml | 2 +- .github/workflows/examples-bouffalolab.yaml | 2 +- .github/workflows/examples-cc13xx_26xx.yaml | 2 +- .github/workflows/examples-cc32xx.yaml | 2 +- .github/workflows/examples-efr32.yaml | 2 +- .github/workflows/examples-esp32.yaml | 4 +- .github/workflows/examples-infineon.yaml | 2 +- .github/workflows/examples-linux-arm.yaml | 2 +- .github/workflows/examples-linux-imx.yaml | 2 +- .../workflows/examples-linux-standalone.yaml | 2 +- .../examples-linux-tv-casting-app.yaml | 2 +- .github/workflows/examples-mw320.yaml | 2 +- .github/workflows/examples-nrfconnect.yaml | 2 +- .github/workflows/examples-nuttx.yaml | 2 +- .github/workflows/examples-openiotsdk.yaml | 2 +- .github/workflows/examples-qpg.yaml | 2 +- .github/workflows/examples-stm32.yaml | 2 +- .github/workflows/examples-telink.yaml | 4 +- .github/workflows/examples-tizen.yaml | 2 +- .github/workflows/full-android.yaml | 2 +- .github/workflows/fuzzing-build.yaml | 2 +- .github/workflows/java-tests.yaml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/minimal-build.yaml | 4 +- .github/workflows/qemu.yaml | 4 +- .github/workflows/release_artifacts.yaml | 4 +- .github/workflows/smoketest-android.yaml | 2 +- .github/workflows/tests.yaml | 4 +- .github/workflows/unit_integration_test.yaml | 2 +- .github/workflows/zap_regeneration.yaml | 2 +- .github/workflows/zap_templates.yaml | 2 +- examples/all-clusters-app/ameba/README.md | 4 +- .../all-clusters-minimal-app/ameba/README.md | 4 +- examples/fabric-admin/README.md | 4 +- examples/fabric-bridge-app/linux/README.md | 4 +- examples/fabric-sync/README.md | 4 +- examples/light-switch-app/ameba/README.md | 4 +- examples/lighting-app/ameba/README.md | 4 +- examples/ota-requestor-app/ameba/README.md | 4 +- examples/pigweed-app/ameba/README.md | 4 +- integrations/cloudbuild/chef.yaml | 8 +-- integrations/cloudbuild/smoke-test.yaml | 14 ++--- src/platform/telink/tl3218x.overlay | 61 ------------------ src/platform/telink/tlsr9258a.overlay | 61 ------------------ src/platform/telink/tlsr9518adk80d.overlay | 63 ------------------- src/platform/telink/tlsr9528a.overlay | 62 ------------------ 51 files changed, 79 insertions(+), 326 deletions(-) delete mode 100644 src/platform/telink/tl3218x.overlay delete mode 100644 src/platform/telink/tlsr9258a.overlay delete mode 100644 src/platform/telink/tlsr9518adk80d.overlay delete mode 100644 src/platform/telink/tlsr9528a.overlay diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index be423b04c039d7..08de9d63fb523c 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:93 + image: ghcr.io/project-chip/chip-build:94 steps: - name: Checkout diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2539edcf6a82fa..47536167563dbb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -43,7 +43,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:93 + image: ghcr.io/project-chip/chip-build:94 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -139,7 +139,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:93 + image: ghcr.io/project-chip/chip-build:94 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -308,7 +308,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:93 + image: ghcr.io/project-chip/chip-build:94 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -371,7 +371,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:93 + image: ghcr.io/project-chip/chip-build:94 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -490,7 +490,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:93 + image: ghcr.io/project-chip/chip-build:94 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index c897952d45107c..b31ce2273360e8 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:93 + image: ghcr.io/project-chip/chip-build:94 options: --user root steps: @@ -57,7 +57,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:93 + image: ghcr.io/project-chip/chip-build-esp32:94 options: --user root steps: @@ -78,7 +78,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:93 + image: ghcr.io/project-chip/chip-build-nrf-platform:94 options: --user root steps: @@ -99,7 +99,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:93 + image: ghcr.io/project-chip/chip-build-telink:94 options: --user root steps: @@ -111,7 +111,7 @@ jobs: platform: telink # - name: Update Zephyr to specific revision (for developers purpose) # shell: bash - # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 8b29ee6b118ebe6eeec3224dbe343474e11403d8" + # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py ffdbfe7560c0b628e03ab487ab110eeed9bdc8c7" - name: CI Examples Telink shell: bash run: | diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index eb45f76f389779..11afa765111972 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -84,7 +84,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-doxygen:93 + image: ghcr.io/project-chip/chip-build-doxygen:94 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 2c1c2555e797e2..421a9516b0ed47 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ameba:93 + image: ghcr.io/project-chip/chip-build-ameba:94 options: --user root steps: diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml index 61ac888ad415a6..07641d9b5893cf 100644 --- a/.github/workflows/examples-asr.yaml +++ b/.github/workflows/examples-asr.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-asr:93 + image: ghcr.io/project-chip/chip-build-asr:94 options: --user root steps: diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index c0178a04c2cb48..7ff1c1c019a141 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-bouffalolab:93 + image: ghcr.io/project-chip/chip-build-bouffalolab:94 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc13xx_26xx.yaml b/.github/workflows/examples-cc13xx_26xx.yaml index 0aaec6d6cc3bf3..c6f41822bd366a 100644 --- a/.github/workflows/examples-cc13xx_26xx.yaml +++ b/.github/workflows/examples-cc13xx_26xx.yaml @@ -42,7 +42,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:93 + image: ghcr.io/project-chip/chip-build-ti:94 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml index c7615bc27de48f..cebb38ccc52d39 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -41,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:93 + image: ghcr.io/project-chip/chip-build-ti:94 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 8e40a0df999f4c..6ed2fa9c6ccecf 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:93 + image: ghcr.io/project-chip/chip-build-efr32:94 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 20ced0375b8f5d..3d3112d2972ecd 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:93 + image: ghcr.io/project-chip/chip-build-esp32:94 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -124,7 +124,7 @@ jobs: if: github.actor != 'restyled-io[bot]' && github.repository_owner == 'espressif' container: - image: ghcr.io/project-chip/chip-build-esp32:93 + image: ghcr.io/project-chip/chip-build-esp32:94 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index 5b7ee30abe1828..7ee9f4554545ae 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-infineon:93 + image: ghcr.io/project-chip/chip-build-infineon:94 env: # TODO: this should probably be part of the dockerfile itself CY_TOOLS_PATHS: /opt/Tools/ModusToolbox/tools_3.2 diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 84a36addb83f94..b4c9ceb210e2dc 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-crosscompile:93 + image: ghcr.io/project-chip/chip-build-crosscompile:94 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index 33098465c1cdcb..dfcb78bb52b41f 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-imx:93 + image: ghcr.io/project-chip/chip-build-imx:94 steps: - name: Checkout diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index b4ed1cd92d2d1d..a27921cc1f68d2 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:93 + image: ghcr.io/project-chip/chip-build:94 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-tv-casting-app.yaml b/.github/workflows/examples-linux-tv-casting-app.yaml index 4bc173f7cc9e64..780ceadc14d5c3 100644 --- a/.github/workflows/examples-linux-tv-casting-app.yaml +++ b/.github/workflows/examples-linux-tv-casting-app.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:93 + image: ghcr.io/project-chip/chip-build:94 steps: - name: Checkout diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index 5b2d082ff5e6f7..9611cd79d97dfa 100644 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:93 + image: ghcr.io/project-chip/chip-build:94 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 0aff592c543da4..cd0d7c87d12547 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:93 + image: ghcr.io/project-chip/chip-build-nrf-platform:94 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-nuttx.yaml b/.github/workflows/examples-nuttx.yaml index 63088ce8f78f53..ad93f339eb2e7e 100644 --- a/.github/workflows/examples-nuttx.yaml +++ b/.github/workflows/examples-nuttx.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nuttx:93 + image: ghcr.io/project-chip/chip-build-nuttx:94 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index 2727b81b868621..6071dc358d96e8 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-openiotsdk:93 + image: ghcr.io/project-chip/chip-build-openiotsdk:94 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" options: --privileged diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index 45e5b6a7436e68..e09b90dc94137b 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:93 + image: ghcr.io/project-chip/chip-build:94 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-stm32.yaml b/.github/workflows/examples-stm32.yaml index e2ec5288adf19f..6e21c0c01a3b18 100644 --- a/.github/workflows/examples-stm32.yaml +++ b/.github/workflows/examples-stm32.yaml @@ -41,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:93 + image: ghcr.io/project-chip/chip-build:94 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 1b6fd20aa72260..b3730809abe90d 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:93 + image: ghcr.io/project-chip/chip-build-telink:94 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -58,7 +58,7 @@ jobs: gh-context: ${{ toJson(github) }} # - name: Update Zephyr to specific revision (for developers purpose) - # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 8b29ee6b118ebe6eeec3224dbe343474e11403d8" + # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py ffdbfe7560c0b628e03ab487ab110eeed9bdc8c7" - name: Build example Telink (B92 retention) Air Quality Sensor App # Run test for master and s07641069 PRs diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index 56a018d533bc0d..968acafa93a829 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen:93 + image: ghcr.io/project-chip/chip-build-tizen:94 options: --user root volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index 4beb8d101e24cd..6abedd95f7bb65 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-android:93 + image: ghcr.io/project-chip/chip-build-android:94 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index 2c8fa9d7f3d4c5..9d756b1e99b229 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -33,7 +33,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:93 + image: ghcr.io/project-chip/chip-build:94 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml index c7730f2c27b32d..dcee14f5659329 100644 --- a/.github/workflows/java-tests.yaml +++ b/.github/workflows/java-tests.yaml @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-java:93 + image: ghcr.io/project-chip/chip-build-java:94 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 731d047f288e6e..b8c0efd60d1ecf 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:93 + image: ghcr.io/project-chip/chip-build:94 steps: - name: Checkout diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml index f933cd69df5531..9a2d132284e65b 100644 --- a/.github/workflows/minimal-build.yaml +++ b/.github/workflows/minimal-build.yaml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-minimal:93 + image: ghcr.io/project-chip/chip-build-minimal:94 steps: - name: Checkout @@ -56,7 +56,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-minimal:93 + image: ghcr.io/project-chip/chip-build-minimal:94 steps: - name: Checkout diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 2a2d52f23a8c6c..f5868fa184ed24 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -41,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' && github.repository_owner == 'espressif' container: - image: ghcr.io/project-chip/chip-build-esp32-qemu:93 + image: ghcr.io/project-chip/chip-build-esp32-qemu:94 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -79,7 +79,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen-qemu:93 + image: ghcr.io/project-chip/chip-build-tizen-qemu:94 options: --user root volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 161d123d9ec495..9fcd2d43e38707 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-esp32:93 + image: ghcr.io/project-chip/chip-build-esp32:94 steps: - name: Checkout @@ -64,7 +64,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-efr32:93 + image: ghcr.io/project-chip/chip-build-efr32:94 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index 114c072cbe30cd..1f4bb250ef3c96 100644 --- a/.github/workflows/smoketest-android.yaml +++ b/.github/workflows/smoketest-android.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-android:93 + image: ghcr.io/project-chip/chip-build-android:94 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 7e19267b3742af..ff8d4d9b37c881 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -50,7 +50,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:93 + image: ghcr.io/project-chip/chip-build:94 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" @@ -457,7 +457,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:93 + image: ghcr.io/project-chip/chip-build:94 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index 449152bf21679c..29fc366d899162 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -40,7 +40,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:93 + image: ghcr.io/project-chip/chip-build:94 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 0cba8cb97c2d17..83a3cde53ad882 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:93 + image: ghcr.io/project-chip/chip-build:94 defaults: run: shell: sh diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index 6900886aed06bb..512295899e3aee 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -35,7 +35,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:93 + image: ghcr.io/project-chip/chip-build:94 defaults: run: shell: sh diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md index 828dd567da7ee0..540f3281205022 100644 --- a/examples/all-clusters-app/ameba/README.md +++ b/examples/all-clusters-app/ameba/README.md @@ -27,11 +27,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:93 + $ docker pull ghcr.io/project-chip/chip-build-ameba:94 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:93 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:94 - Setup build environment: diff --git a/examples/all-clusters-minimal-app/ameba/README.md b/examples/all-clusters-minimal-app/ameba/README.md index 947a9ed09f0eb0..3b1600b3d7b705 100644 --- a/examples/all-clusters-minimal-app/ameba/README.md +++ b/examples/all-clusters-minimal-app/ameba/README.md @@ -27,13 +27,13 @@ The CHIP demo application is supported on - Pull docker image: ``` - $ docker pull ghcr.io/project-chip/chip-build-ameba:93 + $ docker pull ghcr.io/project-chip/chip-build-ameba:94 ``` - Run docker container: ``` - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:93 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:94 ``` - Setup build environment: diff --git a/examples/fabric-admin/README.md b/examples/fabric-admin/README.md index 3ec2cb99671eba..8d33c788984a2c 100644 --- a/examples/fabric-admin/README.md +++ b/examples/fabric-admin/README.md @@ -23,13 +23,13 @@ For Raspberry Pi 4 example: ### Pull Docker Images ``` -docker pull ghcr.io/project-chip/chip-build-crosscompile:93 +docker pull ghcr.io/project-chip/chip-build-crosscompile:94 ``` ### Run docker ``` -docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:93 /bin/bash +docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:94 /bin/bash ``` ### Build diff --git a/examples/fabric-bridge-app/linux/README.md b/examples/fabric-bridge-app/linux/README.md index b8f1b4a68be295..b1e12ae835712c 100644 --- a/examples/fabric-bridge-app/linux/README.md +++ b/examples/fabric-bridge-app/linux/README.md @@ -100,13 +100,13 @@ defined: Pull Docker Images ``` - docker pull ghcr.io/project-chip/chip-build-crosscompile:93 + docker pull ghcr.io/project-chip/chip-build-crosscompile:94 ``` Run docker ``` - docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:93 /bin/bash + docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:94 /bin/bash ``` Build diff --git a/examples/fabric-sync/README.md b/examples/fabric-sync/README.md index 2ef7949245f611..585b7d91ae2de0 100644 --- a/examples/fabric-sync/README.md +++ b/examples/fabric-sync/README.md @@ -92,13 +92,13 @@ defined: Pull Docker Images ```sh - docker pull ghcr.io/project-chip/chip-build-crosscompile:93 + docker pull ghcr.io/project-chip/chip-build-crosscompile:94 ``` Run docker ```sh - docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:93 /bin/bash + docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:94 /bin/bash ``` Build diff --git a/examples/light-switch-app/ameba/README.md b/examples/light-switch-app/ameba/README.md index 9df4fd68612de7..233c78872ddb82 100644 --- a/examples/light-switch-app/ameba/README.md +++ b/examples/light-switch-app/ameba/README.md @@ -26,11 +26,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:93 + $ docker pull ghcr.io/project-chip/chip-build-ameba:94 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:93 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:94 - Setup build environment: diff --git a/examples/lighting-app/ameba/README.md b/examples/lighting-app/ameba/README.md index c4fe32b600c0c0..6e4341221a2ea9 100644 --- a/examples/lighting-app/ameba/README.md +++ b/examples/lighting-app/ameba/README.md @@ -23,11 +23,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:93 + $ docker pull ghcr.io/project-chip/chip-build-ameba:94 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:93 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:94 - Setup build environment: diff --git a/examples/ota-requestor-app/ameba/README.md b/examples/ota-requestor-app/ameba/README.md index c97609b7eb5070..d25638b444b85b 100644 --- a/examples/ota-requestor-app/ameba/README.md +++ b/examples/ota-requestor-app/ameba/README.md @@ -6,11 +6,11 @@ A prototype application that demonstrates OTA Requestor capabilities. - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:93 + $ docker pull ghcr.io/project-chip/chip-build-ameba:94 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:93 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:94 - Setup build environment: diff --git a/examples/pigweed-app/ameba/README.md b/examples/pigweed-app/ameba/README.md index 1af7f586291b52..83cd7b23560843 100644 --- a/examples/pigweed-app/ameba/README.md +++ b/examples/pigweed-app/ameba/README.md @@ -31,11 +31,11 @@ following features are available: - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:93 + $ docker pull ghcr.io/project-chip/chip-build-ameba:94 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:93 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:94 - Setup build environment: diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index fd8543ee2d4280..a9594e2be00846 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:93" + - name: "ghcr.io/project-chip/chip-build-vscode:94" 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:93" + - name: "ghcr.io/project-chip/chip-build-vscode:94" # 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: @@ -23,7 +23,7 @@ steps: - name: pwenv path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:93" + - name: "ghcr.io/project-chip/chip-build-vscode:94" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -38,7 +38,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:93" + - name: "ghcr.io/project-chip/chip-build-vscode:94" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 41a221d048ea06..9a48c18494406d 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:93" + - name: "ghcr.io/project-chip/chip-build-vscode:94" 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:93" + - name: "ghcr.io/project-chip/chip-build-vscode:94" # 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:93" + - name: "ghcr.io/project-chip/chip-build-vscode:94" 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:93" + - name: "ghcr.io/project-chip/chip-build-vscode:94" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -66,7 +66,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:93" + - name: "ghcr.io/project-chip/chip-build-vscode:94" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -88,7 +88,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:93" + - name: "ghcr.io/project-chip/chip-build-vscode:94" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -141,7 +141,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:93" + - name: "ghcr.io/project-chip/chip-build-vscode:94" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv diff --git a/src/platform/telink/tl3218x.overlay b/src/platform/telink/tl3218x.overlay deleted file mode 100644 index 4c74bb14ea216c..00000000000000 --- a/src/platform/telink/tl3218x.overlay +++ /dev/null @@ -1,61 +0,0 @@ -/ { - /* Short TL_Key3 (J6 pin 21) to ground */ - key_pool { - compatible = "gpio-keys"; - - inp { - gpios = <&gpiob 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&gpiob 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - }; - }; - - key_matrix { - compatible = "gpio-keys"; - - col { - gpios = <&gpiob 6 GPIO_ACTIVE_HIGH>, - <&gpiob 7 GPIO_ACTIVE_HIGH>; - }; - - row { - gpios = <&gpiob 3 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>, - <&gpiob 5 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>; - }; - }; - - led_pool { - compatible = "gpio-leds"; - - out { - gpios = <&gpiod 0 GPIO_ACTIVE_HIGH>; - }; - }; - - pwm_pool { - compatible = "pwm-leds"; - out { - pwms = <&pwm0 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>, - <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>, - <&pwm0 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; - }; - }; -}; - -&pwm0 { - /* On board RGB LEDs */ - pinctrl-ch0 = <&pwm_ch0_pb1_default>; - pinctrl-ch2 = <&pwm_ch1_pb2_default>; - pinctrl-ch1 = <&pwm_ch2_pb0_default>; -}; - -&pinctrl { - pwm_ch0_pb1_default: pwm_ch0_pb1_default { - pinmux = ; - }; - pwm_ch1_pb2_default: pwm_ch1_pb2_default { - pinmux = ; - }; - pwm_ch2_pb0_default: pwm_ch2_pb0_default { - pinmux = ; - }; -}; diff --git a/src/platform/telink/tlsr9258a.overlay b/src/platform/telink/tlsr9258a.overlay deleted file mode 100644 index 21918dc0fe06c5..00000000000000 --- a/src/platform/telink/tlsr9258a.overlay +++ /dev/null @@ -1,61 +0,0 @@ -/ { - /* Short TL_Key3 (J6 pin 31) to ground (J4 pin 3, 5, 9) */ - key_pool { - compatible = "gpio-keys"; - - inp { - gpios = <&gpiod 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&gpiod 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - }; - }; - - key_matrix { - compatible = "gpio-keys"; - - col { - gpios = <&gpiod 5 GPIO_ACTIVE_HIGH>, - <&gpiod 7 GPIO_ACTIVE_HIGH>; - }; - - row { - gpios = <&gpiod 4 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>, - <&gpiod 6 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>; - }; - }; - - led_pool { - compatible = "gpio-leds"; - - out { - gpios = <&gpioc 3 GPIO_ACTIVE_HIGH>; - }; - }; - - pwm_pool { - compatible = "pwm-leds"; - out { - pwms = <&pwm0 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>, - <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>, - <&pwm0 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; - }; - }; -}; - -&pwm0 { - /* On board RGB LEDs */ - pinctrl-ch0 = <&pwm_ch0_pc1_default>; - pinctrl-ch2 = <&pwm_ch1_pc0_default>; - pinctrl-ch1 = <&pwm_ch2_pc2_default>; -}; - -&pinctrl { - pwm_ch0_pc1_default: pwm_ch0_pc1_default { - pinmux = ; - }; - pwm_ch1_pc0_default: pwm_ch1_pc0_default { - pinmux = ; - }; - pwm_ch2_pc2_default: pwm_ch2_pc2_default { - pinmux = ; - }; -}; diff --git a/src/platform/telink/tlsr9518adk80d.overlay b/src/platform/telink/tlsr9518adk80d.overlay deleted file mode 100644 index 30ba76f5c42c9b..00000000000000 --- a/src/platform/telink/tlsr9518adk80d.overlay +++ /dev/null @@ -1,63 +0,0 @@ -/ { - /* Short TL_Key1 (J20 pin 15) to ground (J50 pin 15-23) */ - key_pool { - compatible = "gpio-keys"; - - inp { - gpios = <&gpioc 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&gpioc 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - }; - }; - - key_matrix { - compatible = "gpio-keys"; - - col { - gpios = <&gpioc 2 GPIO_ACTIVE_HIGH>, - <&gpioc 0 GPIO_ACTIVE_HIGH>; - }; - - row { - gpios = <&gpioc 3 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>, - <&gpioc 1 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>; - }; - }; - - led_pool{ - compatible = "gpio-leds"; - - out { - gpios = <&gpiob 6 GPIO_ACTIVE_HIGH>; - }; - }; - - pwm_pool { - compatible = "pwm-leds"; - out { - /* Use blue led as indication, red & green - RGB-fixture */ - pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>, - <&pwm0 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>, - <&pwm0 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; - }; - }; -}; - -&pwm0 { - /* On board RGB LEDs */ - pinctrl-ch2 = <&pwm_ch2_pb7_default>; - pinctrl-ch1 = <&pwm_ch1_pb5_default>; - pinctrl-ch0 = <&pwm_ch0_pb4_default>; -}; - -&pinctrl { - pwm_ch2_pb7_default: pwm_ch2_pb7_default { - pinmux = ; - }; - pwm_ch1_pb5_default: pwm_ch1_pb5_default { - pinmux = ; - }; - pwm_ch0_pb4_default: pwm_ch0_pb4_default { - pinmux = ; - }; -}; - diff --git a/src/platform/telink/tlsr9528a.overlay b/src/platform/telink/tlsr9528a.overlay deleted file mode 100644 index fcd51928576ecf..00000000000000 --- a/src/platform/telink/tlsr9528a.overlay +++ /dev/null @@ -1,62 +0,0 @@ -/ { - /* Short TL_Key3 (J5 pin 13) to ground (J3 pin 24, 26, 28, 30) */ - key_pool { - compatible = "gpio-keys"; - - inp { - gpios = <&gpiod 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&gpiod 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - }; - }; - - key_matrix { - compatible = "gpio-keys"; - - col { - gpios = <&gpiod 6 GPIO_ACTIVE_HIGH>, - <&gpiof 6 GPIO_ACTIVE_HIGH>; - }; - - row { - gpios = <&gpiod 2 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>, - <&gpiod 7 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>; - }; - }; - - led_pool { - compatible = "gpio-leds"; - - out { - gpios = <&gpioe 6 GPIO_ACTIVE_HIGH>; - }; - }; - - pwm_pool { - compatible = "pwm-leds"; - out { - pwms = <&pwm0 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>, - <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>, - <&pwm0 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; - }; - }; -}; - -&pwm0 { - /* On board RGB LEDs */ - pinctrl-ch0 = <&pwm_ch0_pe7_default>; - pinctrl-ch2 = <&pwm_ch1_pd1_default>; - pinctrl-ch1 = <&pwm_ch2_pd0_default>; -}; - -&pinctrl { - pwm_ch0_pe7_default: pwm_ch0_pe7_default { - pinmux = ; - }; - pwm_ch1_pd1_default: pwm_ch1_pd1_default { - pinmux = ; - }; - pwm_ch2_pd0_default: pwm_ch2_pd0_default { - pinmux = ; - }; -}; - From 6eb59963a48352afe061e02fd2285dc4c01b4933 Mon Sep 17 00:00:00 2001 From: Sergio Soares Date: Mon, 9 Dec 2024 09:47:01 -0500 Subject: [PATCH 02/72] Fix missing include in transport/SessionDelegate.h (#36753) * fix missing include * use <> --- src/transport/SessionDelegate.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/transport/SessionDelegate.h b/src/transport/SessionDelegate.h index 8de535a265796c..ed7f4f6b3d1b28 100644 --- a/src/transport/SessionDelegate.h +++ b/src/transport/SessionDelegate.h @@ -18,6 +18,7 @@ #include +#include #include namespace chip { From a30f34606930517d2c3144bf077c8679aa92f1dd Mon Sep 17 00:00:00 2001 From: Sergio Soares Date: Mon, 9 Dec 2024 09:47:49 -0500 Subject: [PATCH 03/72] Fix missing include in CompatEnumNames.h (#36755) This PR adds the missing cluster-enums.h header. --- src/app/common/CompatEnumNames.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/common/CompatEnumNames.h b/src/app/common/CompatEnumNames.h index a3154cbb682975..4a24eaa9303b5b 100644 --- a/src/app/common/CompatEnumNames.h +++ b/src/app/common/CompatEnumNames.h @@ -21,6 +21,7 @@ */ #pragma once +#include #include namespace chip { From 72dbbcf2aced06cd8de653f105bf9bb20af484f5 Mon Sep 17 00:00:00 2001 From: Axel Le Bourhis <45206070+axelnxp@users.noreply.github.com> Date: Mon, 9 Dec 2024 16:03:55 +0100 Subject: [PATCH 04/72] [Zephyr] Fix ThreadMetrics diagnostic cluster implementation (#36765) Addressing review comments from #36749 Signed-off-by: Axel Le Bourhis --- src/include/platform/DiagnosticDataProvider.h | 4 ---- .../Zephyr/DiagnosticDataProviderImpl.cpp | 21 +++++++++---------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/include/platform/DiagnosticDataProvider.h b/src/include/platform/DiagnosticDataProvider.h index 68ee70957b3f35..86cc9536ed6b39 100644 --- a/src/include/platform/DiagnosticDataProvider.h +++ b/src/include/platform/DiagnosticDataProvider.h @@ -33,11 +33,7 @@ namespace DeviceLayer { // Maximum length of vendor defined name or prefix of the software thread that is // static for the duration of the thread. -#if defined(CONFIG_THREAD_MAX_NAME_LEN) -static constexpr size_t kMaxThreadNameLength = CONFIG_THREAD_MAX_NAME_LEN - 1; -#else static constexpr size_t kMaxThreadNameLength = 8; -#endif // 48-bit IEEE MAC Address or a 64-bit IEEE MAC Address (e.g. EUI-64). inline constexpr size_t kMaxHardwareAddrSize = 8; diff --git a/src/platform/Zephyr/DiagnosticDataProviderImpl.cpp b/src/platform/Zephyr/DiagnosticDataProviderImpl.cpp index dcb81ae0d0492e..3dc0bf723cbc73 100644 --- a/src/platform/Zephyr/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Zephyr/DiagnosticDataProviderImpl.cpp @@ -61,11 +61,16 @@ namespace { static void GetThreadInfo(const struct k_thread * thread, void * user_data) { size_t unusedStackSize; - ThreadMetrics ** threadMetricsListHead = (ThreadMetrics **) user_data; - ThreadMetrics * threadMetrics = (ThreadMetrics *) malloc(sizeof(ThreadMetrics)); + ThreadMetrics ** threadMetricsListHead = static_cast(user_data); + ThreadMetrics * threadMetrics = Platform::New(); + VerifyOrReturn(threadMetrics != NULL, ChipLogError(DeviceLayer, "Failed to allocate ThreadMetrics")); + +#if defined(CONFIG_THREAD_NAME) Platform::CopyString(threadMetrics->NameBuf, k_thread_name_get((k_tid_t) thread)); threadMetrics->name.Emplace(CharSpan::fromCharString(threadMetrics->NameBuf)); +#endif + threadMetrics->id = (uint64_t) thread; threadMetrics->stackFreeCurrent.ClearValue(); // unsupported metric threadMetrics->stackFreeMinimum.ClearValue(); @@ -81,14 +86,7 @@ static void GetThreadInfo(const struct k_thread * thread, void * user_data) (void) unusedStackSize; #endif - if (*threadMetricsListHead) - { - threadMetrics->Next = *threadMetricsListHead; - } - else - { - threadMetrics->Next = NULL; - } + threadMetrics->Next = *threadMetricsListHead; *threadMetricsListHead = threadMetrics; } @@ -224,6 +222,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::ResetWatermarks() CHIP_ERROR DiagnosticDataProviderImpl::GetThreadMetrics(ThreadMetrics ** threadMetricsOut) { #if defined(CONFIG_THREAD_MONITOR) + *threadMetricsOut = NULL; k_thread_foreach((k_thread_user_cb_t) GetThreadInfo, threadMetricsOut); return CHIP_NO_ERROR; #else @@ -237,7 +236,7 @@ void DiagnosticDataProviderImpl::ReleaseThreadMetrics(ThreadMetrics * threadMetr { ThreadMetrics * thread = threadMetrics; threadMetrics = threadMetrics->Next; - free(thread); + Platform::Delete(thread); } } From 6447c6454c5f41a10bf23be4da818866067de0ea Mon Sep 17 00:00:00 2001 From: Sergio Soares Date: Mon, 9 Dec 2024 10:59:20 -0500 Subject: [PATCH 05/72] TC_DeviceBasicComposition: Fix lighting-app-data-mode-no-unique-id and add tests to CI (#36718) * TC_DeviceBasicComposition: Fix lighting-app-data-mode-no-unique-id and add to CI This PR fixes Basic Composition failures on the lighting-app-data-mode-no-unique-id examples app add the test to CI to prevent it from breaking again. This App is already built in CI, so it shouldn't add much CI cost. * Add other app tests to CI * removed flaky fabric app --- .../lighting-common/lighting-app.matter | 72 ------------ .../lighting-common/lighting-app.zap | 104 ++---------------- .../TC_DeviceBasicComposition.py | 73 ++++++++++++ 3 files changed, 82 insertions(+), 167 deletions(-) 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 d103ddc553fc42..e8e99173b85a17 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 @@ -2577,70 +2577,6 @@ cluster ColorControl = 768 { command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; } -/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */ -cluster OccupancySensing = 1030 { - revision 5; - - enum OccupancySensorTypeEnum : enum8 { - kPIR = 0; - kUltrasonic = 1; - kPIRAndUltrasonic = 2; - kPhysicalContact = 3; - } - - bitmap Feature : bitmap32 { - kOther = 0x1; - kPassiveInfrared = 0x2; - kUltrasonic = 0x4; - kPhysicalContact = 0x8; - kActiveInfrared = 0x10; - kRadar = 0x20; - kRFSensing = 0x40; - kVision = 0x80; - } - - bitmap OccupancyBitmap : bitmap8 { - kOccupied = 0x1; - } - - bitmap OccupancySensorTypeBitmap : bitmap8 { - kPIR = 0x1; - kUltrasonic = 0x2; - kPhysicalContact = 0x4; - } - - struct HoldTimeLimitsStruct { - int16u holdTimeMin = 0; - int16u holdTimeMax = 1; - int16u holdTimeDefault = 2; - } - - info event OccupancyChanged = 0 { - OccupancyBitmap occupancy = 0; - } - - readonly attribute OccupancyBitmap occupancy = 0; - readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; - readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; - attribute access(write: manage) optional int16u holdTime = 3; - readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4; - attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16; - attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17; - attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18; - attribute access(write: manage) optional int16u ultrasonicOccupiedToUnoccupiedDelay = 32; - attribute access(write: manage) optional int16u ultrasonicUnoccupiedToOccupiedDelay = 33; - attribute access(write: manage) optional int8u ultrasonicUnoccupiedToOccupiedThreshold = 34; - attribute access(write: manage) optional int16u physicalContactOccupiedToUnoccupiedDelay = 48; - attribute access(write: manage) optional int16u physicalContactUnoccupiedToOccupiedDelay = 49; - attribute access(write: manage) optional int8u physicalContactUnoccupiedToOccupiedThreshold = 50; - 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; @@ -3127,14 +3063,6 @@ endpoint 1 { handle command MoveColorTemperature; handle command StepColorTemperature; } - - server cluster OccupancySensing { - ram attribute occupancy; - ram attribute occupancySensorType; - ram attribute occupancySensorTypeBitmap; - callback attribute featureMap; - ram attribute clusterRevision default = 5; - } } 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 54693b151520a3..986b06ef58a81b 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 @@ -1,6 +1,6 @@ { "fileFormat": 2, - "featureLevel": 103, + "featureLevel": 104, "creator": "zap", "keyValuePairs": [ { @@ -41,14 +41,16 @@ "code": 22, "profileId": 259, "label": "MA-rootdevice", - "name": "MA-rootdevice" + "name": "MA-rootdevice", + "deviceTypeOrder": 0 }, "deviceTypes": [ { "code": 22, "profileId": 259, "label": "MA-rootdevice", - "name": "MA-rootdevice" + "name": "MA-rootdevice", + "deviceTypeOrder": 0 } ], "deviceVersions": [ @@ -3976,14 +3978,16 @@ "code": 257, "profileId": 259, "label": "MA-dimmablelight", - "name": "MA-dimmablelight" + "name": "MA-dimmablelight", + "deviceTypeOrder": 0 }, "deviceTypes": [ { "code": 257, "profileId": 259, "label": "MA-dimmablelight", - "name": "MA-dimmablelight" + "name": "MA-dimmablelight", + "deviceTypeOrder": 0 } ], "deviceVersions": [ @@ -5622,96 +5626,6 @@ "reportableChange": 0 } ] - }, - { - "name": "Occupancy Sensing", - "code": 1030, - "mfgCode": null, - "define": "OCCUPANCY_SENSING_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "Occupancy", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "OccupancyBitmap", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OccupancySensorType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "OccupancySensorTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OccupancySensorTypeBitmap", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "OccupancySensorTypeBitmap", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "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": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] } ] } diff --git a/src/python_testing/TC_DeviceBasicComposition.py b/src/python_testing/TC_DeviceBasicComposition.py index 0f227c2c672ea4..71a8b6422ecdd0 100644 --- a/src/python_testing/TC_DeviceBasicComposition.py +++ b/src/python_testing/TC_DeviceBasicComposition.py @@ -86,6 +86,72 @@ # script-args: --storage-path admin_storage.json # factory-reset: false # quiet: true +# run9: +# app: ${ENERGY_MANAGEMENT_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 +# run10: +# app: ${LIT_ICD_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 +# run11: +# app: ${CHIP_MICROWAVE_OVEN_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 +# run12: +# app: ${CHIP_RVC_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 +# run13: +# app: ${NETWORK_MANAGEMENT_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 +# run14: +# app: ${LIGHTING_APP_NO_UNIQUE_ID} +# 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 # === END CI TEST ARGUMENTS === # Run 1: runs through all tests @@ -95,6 +161,13 @@ # Run 5: Tests CASE connection using manual code (12.1 only) # Run 6: Tests CASE connection using QR code (12.1 only) # Run 7: Tests CASE connection using manual discriminator and passcode (12.1 only) +# Run 8: Tests reusing storage from run7 (i.e. factory-reset=false) +# Run 9: Tests against energy-management-app +# Run 10: Tests against lit-icd app +# Run 11: Tests against microwave-oven app +# Run 12: Tests against chip-rvc app +# Run 13: Tests against network-management-app +# Run 14: Tests against lighting-app-data-mode-no-unique-id import logging from dataclasses import dataclass From 5fe955208189abd189c33a713e07b3eae9812151 Mon Sep 17 00:00:00 2001 From: shgutte <102281713+shgutte@users.noreply.github.com> Date: Mon, 9 Dec 2024 22:31:00 +0530 Subject: [PATCH 06/72] Adds changes for the zap file (#36761) --- .../data_model/refrigerator-thread-app.matter | 100 +++++++- .../data_model/refrigerator-thread-app.zap | 228 ++++++++++------- .../data_model/refrigerator-wifi-app.matter | 100 +++++++- .../data_model/refrigerator-wifi-app.zap | 242 +++++++++++------- 4 files changed, 457 insertions(+), 213 deletions(-) diff --git a/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.matter b/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.matter index 813ade53790060..38c88d543ec6a2 100644 --- a/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.matter +++ b/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.matter @@ -291,6 +291,78 @@ cluster Identify = 3 { command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } +/** Attributes and commands for switching devices between 'On' and 'Off' states. */ +cluster OnOff = 6 { + revision 6; + + enum DelayedAllOffEffectVariantEnum : enum8 { + kDelayedOffFastFade = 0; + kNoFade = 1; + kDelayedOffSlowFade = 2; + } + + enum DyingLightEffectVariantEnum : enum8 { + kDyingLightFadeOff = 0; + } + + enum EffectIdentifierEnum : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + enum StartUpOnOffEnum : enum8 { + kOff = 0; + kOn = 1; + kToggle = 2; + } + + bitmap Feature : bitmap32 { + kLighting = 0x1; + kDeadFrontBehavior = 0x2; + kOffOnly = 0x4; + } + + bitmap OnOffControlBitmap : bitmap8 { + kAcceptOnlyWhenOn = 0x1; + } + + readonly attribute boolean onOff = 0; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; + 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 OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ + command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ + command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ + command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; +} + /** 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; @@ -1643,6 +1715,7 @@ cluster RefrigeratorAlarm = 87 { endpoint 0 { device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { callback attribute deviceTypeList; @@ -1704,20 +1777,6 @@ endpoint 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; @@ -1901,6 +1960,19 @@ endpoint 1 { handle command TriggerEffect; } + server cluster OnOff { + ram attribute onOff default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 6; + + handle command Off; + handle command On; + handle command Toggle; + } + server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; diff --git a/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.zap b/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.zap index d5933140eff7fd..47a8600389badb 100644 --- a/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.zap +++ b/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.zap @@ -873,7 +873,7 @@ "code": 41, "mfgCode": null, "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", - "side": "server", + "side": "client", "enabled": 1, "commands": [ { @@ -881,7 +881,7 @@ "code": 0, "mfgCode": null, "source": "client", - "isIncoming": 1, + "isIncoming": 0, "isEnabled": 1 }, { @@ -889,7 +889,7 @@ "code": 1, "mfgCode": null, "source": "server", - "isIncoming": 0, + "isIncoming": 1, "isEnabled": 1 }, { @@ -897,7 +897,7 @@ "code": 2, "mfgCode": null, "source": "client", - "isIncoming": 1, + "isIncoming": 0, "isEnabled": 1 }, { @@ -905,7 +905,7 @@ "code": 3, "mfgCode": null, "source": "server", - "isIncoming": 0, + "isIncoming": 1, "isEnabled": 1 }, { @@ -913,91 +913,9 @@ "code": 4, "mfgCode": null, "source": "client", - "isIncoming": 1, + "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -3027,6 +2945,138 @@ "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": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "OnOff", + "code": 0, + "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": "GeneratedCommandList", "code": 65528, @@ -3101,7 +3151,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.matter b/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.matter index 857c8058f119a5..acb85ae85a4066 100644 --- a/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.matter +++ b/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.matter @@ -291,6 +291,78 @@ cluster Identify = 3 { command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } +/** Attributes and commands for switching devices between 'On' and 'Off' states. */ +cluster OnOff = 6 { + revision 6; + + enum DelayedAllOffEffectVariantEnum : enum8 { + kDelayedOffFastFade = 0; + kNoFade = 1; + kDelayedOffSlowFade = 2; + } + + enum DyingLightEffectVariantEnum : enum8 { + kDyingLightFadeOff = 0; + } + + enum EffectIdentifierEnum : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + enum StartUpOnOffEnum : enum8 { + kOff = 0; + kOn = 1; + kToggle = 2; + } + + bitmap Feature : bitmap32 { + kLighting = 0x1; + kDeadFrontBehavior = 0x2; + kOffOnly = 0x4; + } + + bitmap OnOffControlBitmap : bitmap8 { + kAcceptOnlyWhenOn = 0x1; + } + + readonly attribute boolean onOff = 0; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; + 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 OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ + command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ + command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ + command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; +} + /** 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; @@ -1554,6 +1626,7 @@ cluster RefrigeratorAlarm = 87 { endpoint 0 { device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { callback attribute deviceTypeList; @@ -1615,20 +1688,6 @@ endpoint 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; @@ -1809,6 +1868,19 @@ endpoint 1 { handle command TriggerEffect; } + server cluster OnOff { + ram attribute onOff default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 6; + + handle command Off; + handle command On; + handle command Toggle; + } + server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; diff --git a/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.zap b/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.zap index 53f028aef19613..d8bb82237f84c3 100644 --- a/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.zap +++ b/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.zap @@ -19,18 +19,18 @@ "package": [ { "pathRelativity": "relativeToZap", - "path": "../../../../src/app/zap-templates/zcl/zcl.json", - "type": "zcl-properties", + "path": "../../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", "category": "matter", - "version": 1, - "description": "Matter SDK ZCL data" + "version": "chip-v1" }, { "pathRelativity": "relativeToZap", - "path": "../../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", + "path": "../../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", "category": "matter", - "version": "chip-v1" + "version": 1, + "description": "Matter SDK ZCL data" } ], "endpointTypes": [ @@ -873,7 +873,7 @@ "code": 41, "mfgCode": null, "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", - "side": "server", + "side": "client", "enabled": 1, "commands": [ { @@ -881,7 +881,7 @@ "code": 0, "mfgCode": null, "source": "client", - "isIncoming": 1, + "isIncoming": 0, "isEnabled": 1 }, { @@ -889,7 +889,7 @@ "code": 1, "mfgCode": null, "source": "server", - "isIncoming": 0, + "isIncoming": 1, "isEnabled": 1 }, { @@ -897,7 +897,7 @@ "code": 2, "mfgCode": null, "source": "client", - "isIncoming": 1, + "isIncoming": 0, "isEnabled": 1 }, { @@ -905,7 +905,7 @@ "code": 3, "mfgCode": null, "source": "server", - "isIncoming": 0, + "isIncoming": 1, "isEnabled": 1 }, { @@ -913,91 +913,9 @@ "code": 4, "mfgCode": null, "source": "client", - "isIncoming": 1, + "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -2932,6 +2850,138 @@ "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": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "OnOff", + "code": 0, + "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": "GeneratedCommandList", "code": 65528, @@ -3006,7 +3056,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, From 59799008fcee10788345de9484d147dbbc5917de Mon Sep 17 00:00:00 2001 From: simonhmorris1 <112178216+simonhmorris1@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:31:57 +0000 Subject: [PATCH 07/72] TC_CNET_4_11:Correct Step 7 PICS(#452) (#36701) --- src/app/tests/suites/certification/Test_TC_CNET_4_11.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_11.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_11.yaml index 4d3f94418afef9..231ede2b29284e 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_11.yaml @@ -160,7 +160,7 @@ tests: "Step 7: TH sends ConnectNetwork command to the DUT with NetworkID field set to PIXIT.CNET.WIFI_2ND_ACCESSPOINT_SSID and Breadcrumb field set to 2" - PICS: CNET.C.C06.Tx + PICS: CNET.S.C06.Rsp timedInteractionTimeoutMs: 5000 command: "ConnectNetwork" arguments: From 73cc4f1a75dda987d01c7b3856660b3b4a49481b Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 9 Dec 2024 16:11:54 -0500 Subject: [PATCH 08/72] Move `src/app/codegen-data-model-provider` to `src/data-model-providers/codegen` (#36752) * Move codegen provider to data-model-providers/codegen to not place it within app directly * Restyle * Fix paths with minimal change --------- Co-authored-by: Andrei Litvin --- .github/workflows/lint.yml | 4 ++-- .../ameba/main/chipinterface.cpp | 2 +- .../air-purifier-app/cc32xx/main/AppTask.cpp | 2 +- .../ameba/main/chipinterface.cpp | 2 +- .../infineon/psoc6/src/AppTask.cpp | 2 +- .../all-clusters-app/linux/fuzzing-main.cpp | 2 +- .../nrfconnect/main/AppTask.cpp | 2 +- examples/all-clusters-app/nxp/mw320/main.cpp | 2 +- .../ameba/main/chipinterface.cpp | 2 +- .../infineon/psoc6/src/AppTask.cpp | 2 +- .../linux/fuzzing-main.cpp | 2 +- .../mbed/main/AppTask.cpp | 2 +- .../nrfconnect/main/AppTask.cpp | 2 +- examples/chef/ameba/main/chipinterface.cpp | 2 +- examples/chef/esp32/main/main.cpp | 2 +- examples/chef/nrfconnect/main.cpp | 2 +- .../chip-tool/commands/common/CHIPCommand.cpp | 2 +- .../nxp/k32w0/main/AppTask.cpp | 2 +- .../commands/common/CHIPCommand.cpp | 2 +- .../ameba/main/chipinterface.cpp | 2 +- .../cc13x4_26x4/src/AppTask.cpp | 2 +- .../light-switch-app/genio/src/AppTask.cpp | 2 +- .../nrfconnect/main/AppTask.cpp | 2 +- examples/light-switch-app/qpg/src/AppTask.cpp | 2 +- .../lighting-app/ameba/main/chipinterface.cpp | 2 +- .../lighting-app/cc13x4_26x4/src/AppTask.cpp | 2 +- examples/lighting-app/genio/src/AppTask.cpp | 2 +- .../infineon/psoc6/src/AppTask.cpp | 2 +- examples/lighting-app/mbed/main/AppTask.cpp | 2 +- .../lighting-app/nrfconnect/main/AppTask.cpp | 2 +- .../lighting-app/nxp/k32w0/main/AppTask.cpp | 2 +- examples/lighting-app/qpg/src/AppTask.cpp | 2 +- .../stm32/src/STM32WB5/AppTask.cpp | 2 +- .../lit-icd-app/nrfconnect/main/AppTask.cpp | 2 +- examples/lock-app/cc13x4_26x4/src/AppTask.cpp | 2 +- examples/lock-app/cc32xx/main/AppTask.cpp | 2 +- examples/lock-app/genio/src/AppTask.cpp | 2 +- .../lock-app/infineon/psoc6/src/AppTask.cpp | 2 +- examples/lock-app/mbed/main/AppTask.cpp | 2 +- examples/lock-app/nrfconnect/main/AppTask.cpp | 2 +- .../lock-app/nxp/k32w/k32w0/main/AppTask.cpp | 2 +- examples/lock-app/qpg/src/AppTask.cpp | 2 +- examples/log-source-app/linux/main.cpp | 2 +- .../ameba/main/chipinterface.cpp | 2 +- .../ota-requestor-app/genio/src/AppTask.cpp | 2 +- .../ota-requestor-app/mbed/main/AppTask.cpp | 2 +- examples/platform/asr/init_Matter.cpp | 2 +- .../platform/beken/common/BekenAppServer.cpp | 2 +- .../bouffalolab/common/plat/platform.cpp | 2 +- .../platform/esp32/common/Esp32AppServer.cpp | 2 +- .../infineon/cyw30739/matter_config.cpp | 2 +- examples/platform/linux/AppMain.cpp | 2 +- examples/platform/linux/BUILD.gn | 4 ++-- examples/platform/linux/CommissionerMain.cpp | 2 +- .../common/app_task/source/AppTaskBase.cpp | 2 +- examples/platform/nxp/se05x/linux/AppMain.cpp | 2 +- .../openiotsdk/app/openiotsdk_platform.cpp | 2 +- examples/platform/silabs/MatterConfig.cpp | 2 +- examples/platform/silabs/SiWx917/BUILD.gn | 2 +- examples/platform/silabs/efr32/BUILD.gn | 2 +- .../telink/common/src/AppTaskCommon.cpp | 2 +- .../pump-app/cc13x4_26x4/main/AppTask.cpp | 2 +- examples/pump-app/nrfconnect/main/AppTask.cpp | 2 +- .../cc13x4_26x4/main/AppTask.cpp | 2 +- .../nrfconnect/main/AppTask.cpp | 2 +- examples/shell/cc13x4_26x4/main/AppTask.cpp | 2 +- examples/shell/shell_common/cmd_server.cpp | 2 +- examples/thermostat/genio/src/AppTask.cpp | 2 +- examples/thermostat/qpg/src/AppTask.cpp | 2 +- ...CommonCaseDeviceServerInitParamsProvider.h | 2 +- examples/tv-casting-app/linux/main.cpp | 2 +- examples/tv-casting-app/linux/simple-app.cpp | 2 +- .../window-app/nrfconnect/main/AppTask.cpp | 2 +- src/BUILD.gn | 4 ++-- src/app/chip_data_model.cmake | 2 +- src/app/chip_data_model.gni | 2 +- .../server/java/AndroidAppServerWrapper.cpp | 2 +- src/app/server/java/BUILD.gn | 2 +- src/app/tests/BUILD.gn | 2 +- src/app/tests/TestAclEvent.cpp | 2 +- .../tests/TestAttributePathExpandIterator.cpp | 2 +- .../tests/TestCommissioningWindowManager.cpp | 2 +- src/app/tests/TestInteractionModelEngine.cpp | 2 +- src/app/tests/TestReadInteraction.cpp | 2 +- src/app/tests/TestReportScheduler.cpp | 2 +- src/app/tests/TestReportingEngine.cpp | 2 +- src/app/tests/test-interaction-model-api.cpp | 2 +- src/app/util/mock/BUILD.gn | 2 +- .../java/AndroidDeviceControllerWrapper.cpp | 2 +- src/controller/java/BUILD.gn | 2 +- .../ChipDeviceController-ScriptBinding.cpp | 2 +- .../python/chip/internal/CommissionerImpl.cpp | 2 +- .../python/chip/server/ServerInit.cpp | 2 +- src/controller/tests/TestEventChunking.cpp | 2 +- src/controller/tests/TestReadChunking.cpp | 2 +- .../tests/TestServerCommandDispatch.cpp | 4 ++-- src/controller/tests/TestWriteChunking.cpp | 2 +- .../tests/data_model/DataModelFixtures.cpp | 2 +- .../CHIP/MTRDeviceControllerFactory.mm | 2 +- .../Matter.xcodeproj/project.pbxproj | 14 +++++++------ .../codegen}/BUILD.gn | 0 .../codegen}/CodegenDataModelProvider.cpp | 2 +- .../codegen}/CodegenDataModelProvider.h | 0 .../CodegenDataModelProvider_Read.cpp | 6 +++--- .../CodegenDataModelProvider_Write.cpp | 6 +++--- .../codegen}/EmberAttributeDataBuffer.cpp | 2 +- .../codegen}/EmberAttributeDataBuffer.h | 0 .../codegen}/EmberMetadata.cpp | 2 +- .../codegen}/EmberMetadata.h | 0 .../codegen}/Instance.cpp | 4 ++-- .../codegen}/Instance.h | 0 .../codegen}/model.cmake | 0 .../codegen}/model.gni | 20 +++++++++---------- .../codegen}/tests/BUILD.gn | 2 +- .../codegen}/tests/EmberInvokeOverride.cpp | 0 .../codegen}/tests/EmberInvokeOverride.h | 0 .../codegen}/tests/EmberReadWriteOverride.cpp | 0 .../codegen}/tests/EmberReadWriteOverride.h | 0 .../InteractionModelTemporaryOverrides.cpp | 0 .../tests/TestCodegenModelViaMocks.cpp | 6 +++--- .../tests/TestEmberAttributeDataBuffer.cpp | 2 +- 121 files changed, 137 insertions(+), 135 deletions(-) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/BUILD.gn (100%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/CodegenDataModelProvider.cpp (99%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/CodegenDataModelProvider.h (100%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/CodegenDataModelProvider_Read.cpp (96%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/CodegenDataModelProvider_Write.cpp (98%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/EmberAttributeDataBuffer.cpp (99%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/EmberAttributeDataBuffer.h (100%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/EmberMetadata.cpp (97%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/EmberMetadata.h (100%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/Instance.cpp (89%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/Instance.h (100%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/model.cmake (100%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/model.gni (64%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/tests/BUILD.gn (96%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/tests/EmberInvokeOverride.cpp (100%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/tests/EmberInvokeOverride.h (100%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/tests/EmberReadWriteOverride.cpp (100%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/tests/EmberReadWriteOverride.h (100%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/tests/InteractionModelTemporaryOverrides.cpp (100%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/tests/TestCodegenModelViaMocks.cpp (99%) rename src/{app/codegen-data-model-provider => data-model-providers/codegen}/tests/TestEmberAttributeDataBuffer.cpp (99%) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b8c0efd60d1ecf..d15e6875285c9d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -292,8 +292,8 @@ jobs: git grep -I -n 'emberAfWriteAttribute' -- './*' \ ':(exclude).github/workflows/lint.yml' \ ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' \ - ':(exclude)src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp' \ - ':(exclude)src/app/codegen-data-model-provider/tests/EmberReadWriteOverride.cpp' \ + ':(exclude)src/data-model-providers/codegen/CodegenDataModelProvider_Write.cpp' \ + ':(exclude)src/data-model-providers/codegen/tests/EmberReadWriteOverride.cpp' \ ':(exclude)src/app/dynamic_server/DynamicDispatcher.cpp' \ ':(exclude)src/app/util/attribute-table.cpp' \ ':(exclude)src/app/util/attribute-table.h' \ diff --git a/examples/air-purifier-app/ameba/main/chipinterface.cpp b/examples/air-purifier-app/ameba/main/chipinterface.cpp index 368fa8eee05a8a..766197dec366ae 100644 --- a/examples/air-purifier-app/ameba/main/chipinterface.cpp +++ b/examples/air-purifier-app/ameba/main/chipinterface.cpp @@ -30,9 +30,9 @@ #include #include #include -#include #include #include +#include #include #include #include diff --git a/examples/air-purifier-app/cc32xx/main/AppTask.cpp b/examples/air-purifier-app/cc32xx/main/AppTask.cpp index a14ccbeff0a900..b604271d5f87b8 100644 --- a/examples/air-purifier-app/cc32xx/main/AppTask.cpp +++ b/examples/air-purifier-app/cc32xx/main/AppTask.cpp @@ -38,9 +38,9 @@ #include #include -#include #include #include +#include #include #include diff --git a/examples/all-clusters-app/ameba/main/chipinterface.cpp b/examples/all-clusters-app/ameba/main/chipinterface.cpp index 7ba25ed011cd41..80a98b9c3d4c69 100644 --- a/examples/all-clusters-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-app/ameba/main/chipinterface.cpp @@ -31,10 +31,10 @@ #include #include -#include #include #include #include +#include #include #include diff --git a/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp b/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp index 3f56626cd97b59..5c416f847d3293 100644 --- a/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp @@ -25,7 +25,6 @@ #include "LEDWidget.h" #include #include -#include #include #include #include @@ -35,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/all-clusters-app/linux/fuzzing-main.cpp b/examples/all-clusters-app/linux/fuzzing-main.cpp index 565e8198c26d25..2b41a2517a16bb 100644 --- a/examples/all-clusters-app/linux/fuzzing-main.cpp +++ b/examples/all-clusters-app/linux/fuzzing-main.cpp @@ -16,8 +16,8 @@ */ #include "AppMain.h" -#include #include +#include #include diff --git a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp index 44a656279118a4..44a0a056bf44f2 100644 --- a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp +++ b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp @@ -30,9 +30,9 @@ #include #include #include -#include #include #include +#include #include #include diff --git a/examples/all-clusters-app/nxp/mw320/main.cpp b/examples/all-clusters-app/nxp/mw320/main.cpp index fbf99510c3cbfa..a828706b0fa67f 100644 --- a/examples/all-clusters-app/nxp/mw320/main.cpp +++ b/examples/all-clusters-app/nxp/mw320/main.cpp @@ -32,12 +32,12 @@ #include #include #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp b/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp index 7e2dc227f69b56..8f18742ca5b42d 100644 --- a/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp @@ -27,12 +27,12 @@ #include #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp b/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp index 893f585717dc9f..1c0008b63bb7cb 100644 --- a/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp @@ -25,7 +25,6 @@ #include "LEDWidget.h" #include #include -#include #include #include #include @@ -35,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/all-clusters-minimal-app/linux/fuzzing-main.cpp b/examples/all-clusters-minimal-app/linux/fuzzing-main.cpp index df61dc538ad10c..4e6b390225819c 100644 --- a/examples/all-clusters-minimal-app/linux/fuzzing-main.cpp +++ b/examples/all-clusters-minimal-app/linux/fuzzing-main.cpp @@ -16,8 +16,8 @@ */ #include "AppMain.h" -#include #include +#include using namespace chip; using namespace chip::DeviceLayer; diff --git a/examples/all-clusters-minimal-app/mbed/main/AppTask.cpp b/examples/all-clusters-minimal-app/mbed/main/AppTask.cpp index 16e1a665da4518..81f5f15a59c1e6 100644 --- a/examples/all-clusters-minimal-app/mbed/main/AppTask.cpp +++ b/examples/all-clusters-minimal-app/mbed/main/AppTask.cpp @@ -20,12 +20,12 @@ #include "LEDWidget.h" #include -#include #include #include #include #include #include +#include #include #include diff --git a/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp b/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp index 7cad0ac8a13a00..9254d52d270ee4 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp +++ b/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp @@ -22,9 +22,9 @@ #include "LEDUtil.h" #include "binding-handler.h" -#include #include #include +#include #include #include diff --git a/examples/chef/ameba/main/chipinterface.cpp b/examples/chef/ameba/main/chipinterface.cpp index e54572c9be1fb0..52aed5ff4d39a9 100644 --- a/examples/chef/ameba/main/chipinterface.cpp +++ b/examples/chef/ameba/main/chipinterface.cpp @@ -28,12 +28,12 @@ #include #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/examples/chef/esp32/main/main.cpp b/examples/chef/esp32/main/main.cpp index 29de25b804d59a..0abd996d4182a4 100644 --- a/examples/chef/esp32/main/main.cpp +++ b/examples/chef/esp32/main/main.cpp @@ -30,9 +30,9 @@ #include #include -#include #include #include +#include #include #include diff --git a/examples/chef/nrfconnect/main.cpp b/examples/chef/nrfconnect/main.cpp index fa8cfc3820032b..ab2fc8cd51fb25 100644 --- a/examples/chef/nrfconnect/main.cpp +++ b/examples/chef/nrfconnect/main.cpp @@ -25,9 +25,9 @@ #include #include -#include #include #include +#include #include #include diff --git a/examples/chip-tool/commands/common/CHIPCommand.cpp b/examples/chip-tool/commands/common/CHIPCommand.cpp index b37bed15afb3d7..5401f907bc874d 100644 --- a/examples/chip-tool/commands/common/CHIPCommand.cpp +++ b/examples/chip-tool/commands/common/CHIPCommand.cpp @@ -18,11 +18,11 @@ #include "CHIPCommand.h" -#include #include #include #include #include +#include #include #include #include diff --git a/examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp b/examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp index 9beea7e0487814..f9fe8ef8cd5c7a 100644 --- a/examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp +++ b/examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp @@ -18,9 +18,9 @@ */ #include "AppTask.h" #include "AppEvent.h" -#include #include #include +#include #include #include diff --git a/examples/fabric-admin/commands/common/CHIPCommand.cpp b/examples/fabric-admin/commands/common/CHIPCommand.cpp index bf8da172d3aa1f..c5f56d2a690bc7 100644 --- a/examples/fabric-admin/commands/common/CHIPCommand.cpp +++ b/examples/fabric-admin/commands/common/CHIPCommand.cpp @@ -20,9 +20,9 @@ #include "IcdManager.h" -#include #include #include +#include #include #include #include diff --git a/examples/light-switch-app/ameba/main/chipinterface.cpp b/examples/light-switch-app/ameba/main/chipinterface.cpp index e892030933d06e..f883f0e030f9eb 100644 --- a/examples/light-switch-app/ameba/main/chipinterface.cpp +++ b/examples/light-switch-app/ameba/main/chipinterface.cpp @@ -29,10 +29,10 @@ #include #include -#include #include #include #include +#include #include #include #include diff --git a/examples/light-switch-app/cc13x4_26x4/src/AppTask.cpp b/examples/light-switch-app/cc13x4_26x4/src/AppTask.cpp index 31855e1621f7fe..ce836b0c264821 100644 --- a/examples/light-switch-app/cc13x4_26x4/src/AppTask.cpp +++ b/examples/light-switch-app/cc13x4_26x4/src/AppTask.cpp @@ -24,9 +24,9 @@ #include "FreeRTOS.h" -#include #include #include +#include #include #include diff --git a/examples/light-switch-app/genio/src/AppTask.cpp b/examples/light-switch-app/genio/src/AppTask.cpp index 2b3000e2ff9eb6..95adc2f402d925 100644 --- a/examples/light-switch-app/genio/src/AppTask.cpp +++ b/examples/light-switch-app/genio/src/AppTask.cpp @@ -27,10 +27,10 @@ #include #include -#include #include #include #include +#include #include diff --git a/examples/light-switch-app/nrfconnect/main/AppTask.cpp b/examples/light-switch-app/nrfconnect/main/AppTask.cpp index 7f9ec93e05576a..152e175afd1ad6 100644 --- a/examples/light-switch-app/nrfconnect/main/AppTask.cpp +++ b/examples/light-switch-app/nrfconnect/main/AppTask.cpp @@ -27,11 +27,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/examples/light-switch-app/qpg/src/AppTask.cpp b/examples/light-switch-app/qpg/src/AppTask.cpp index 1b57f10240ceaa..d9878c7fe31672 100644 --- a/examples/light-switch-app/qpg/src/AppTask.cpp +++ b/examples/light-switch-app/qpg/src/AppTask.cpp @@ -35,10 +35,10 @@ using namespace ::chip; #include #include #include -#include #include #include #include +#include #include #include diff --git a/examples/lighting-app/ameba/main/chipinterface.cpp b/examples/lighting-app/ameba/main/chipinterface.cpp index a12853e94de73d..0587d3134cadee 100644 --- a/examples/lighting-app/ameba/main/chipinterface.cpp +++ b/examples/lighting-app/ameba/main/chipinterface.cpp @@ -31,9 +31,9 @@ #include #include -#include #include #include +#include #include #include #include diff --git a/examples/lighting-app/cc13x4_26x4/src/AppTask.cpp b/examples/lighting-app/cc13x4_26x4/src/AppTask.cpp index 3e949dc7ba3b57..3ff950ba0ca1fb 100644 --- a/examples/lighting-app/cc13x4_26x4/src/AppTask.cpp +++ b/examples/lighting-app/cc13x4_26x4/src/AppTask.cpp @@ -44,10 +44,10 @@ #include #include -#include #include #include #include +#include #include #include diff --git a/examples/lighting-app/genio/src/AppTask.cpp b/examples/lighting-app/genio/src/AppTask.cpp index c5fa913e85d948..b6b31cec05abe7 100644 --- a/examples/lighting-app/genio/src/AppTask.cpp +++ b/examples/lighting-app/genio/src/AppTask.cpp @@ -29,10 +29,10 @@ #include #include #include -#include #include #include #include +#include #include diff --git a/examples/lighting-app/infineon/psoc6/src/AppTask.cpp b/examples/lighting-app/infineon/psoc6/src/AppTask.cpp index 07c3024c0797ef..47d68bc3bead8a 100644 --- a/examples/lighting-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/lighting-app/infineon/psoc6/src/AppTask.cpp @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include /* OTA related includes */ diff --git a/examples/lighting-app/mbed/main/AppTask.cpp b/examples/lighting-app/mbed/main/AppTask.cpp index bcae9d972f40fe..c4def4fe0ef006 100644 --- a/examples/lighting-app/mbed/main/AppTask.cpp +++ b/examples/lighting-app/mbed/main/AppTask.cpp @@ -20,12 +20,12 @@ #include "LEDWidget.h" #include "LightingManager.h" -#include #include #include #include #include #include +#include #include #include diff --git a/examples/lighting-app/nrfconnect/main/AppTask.cpp b/examples/lighting-app/nrfconnect/main/AppTask.cpp index 1427b811edb183..754b8db0b5d892 100644 --- a/examples/lighting-app/nrfconnect/main/AppTask.cpp +++ b/examples/lighting-app/nrfconnect/main/AppTask.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -37,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/lighting-app/nxp/k32w0/main/AppTask.cpp b/examples/lighting-app/nxp/k32w0/main/AppTask.cpp index 7c0f895845146b..c6d3baf575a254 100644 --- a/examples/lighting-app/nxp/k32w0/main/AppTask.cpp +++ b/examples/lighting-app/nxp/k32w0/main/AppTask.cpp @@ -22,10 +22,10 @@ #include #include -#include #include #include #include +#include #include #include #include diff --git a/examples/lighting-app/qpg/src/AppTask.cpp b/examples/lighting-app/qpg/src/AppTask.cpp index 27386a625be497..53b255dfa8cb7e 100644 --- a/examples/lighting-app/qpg/src/AppTask.cpp +++ b/examples/lighting-app/qpg/src/AppTask.cpp @@ -35,9 +35,9 @@ #include #include #include -#include #include #include +#include #include #include diff --git a/examples/lighting-app/stm32/src/STM32WB5/AppTask.cpp b/examples/lighting-app/stm32/src/STM32WB5/AppTask.cpp index be4a3c4984c307..701493b777f381 100644 --- a/examples/lighting-app/stm32/src/STM32WB5/AppTask.cpp +++ b/examples/lighting-app/stm32/src/STM32WB5/AppTask.cpp @@ -37,12 +37,12 @@ /*Matter includes*/ #include #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/examples/lit-icd-app/nrfconnect/main/AppTask.cpp b/examples/lit-icd-app/nrfconnect/main/AppTask.cpp index 49947fe9da3ef9..ca16beda30de8a 100644 --- a/examples/lit-icd-app/nrfconnect/main/AppTask.cpp +++ b/examples/lit-icd-app/nrfconnect/main/AppTask.cpp @@ -29,8 +29,8 @@ #include #include #include -#include #include +#include #include #include diff --git a/examples/lock-app/cc13x4_26x4/src/AppTask.cpp b/examples/lock-app/cc13x4_26x4/src/AppTask.cpp index 4a6e9466a0dc2d..b67d795e1bb8b7 100644 --- a/examples/lock-app/cc13x4_26x4/src/AppTask.cpp +++ b/examples/lock-app/cc13x4_26x4/src/AppTask.cpp @@ -43,10 +43,10 @@ #include #include -#include #include #include #include +#include #include #include diff --git a/examples/lock-app/cc32xx/main/AppTask.cpp b/examples/lock-app/cc32xx/main/AppTask.cpp index b783a862875fcd..4973c7a380676c 100644 --- a/examples/lock-app/cc32xx/main/AppTask.cpp +++ b/examples/lock-app/cc32xx/main/AppTask.cpp @@ -38,9 +38,9 @@ #include #include -#include #include #include +#include #include #include diff --git a/examples/lock-app/genio/src/AppTask.cpp b/examples/lock-app/genio/src/AppTask.cpp index 6897792d2ed4b7..f27a2fcad76b9b 100644 --- a/examples/lock-app/genio/src/AppTask.cpp +++ b/examples/lock-app/genio/src/AppTask.cpp @@ -28,10 +28,10 @@ #include #include #include -#include #include #include #include +#include #include diff --git a/examples/lock-app/infineon/psoc6/src/AppTask.cpp b/examples/lock-app/infineon/psoc6/src/AppTask.cpp index 6ce6f57315267b..c4880e10937889 100644 --- a/examples/lock-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/lock-app/infineon/psoc6/src/AppTask.cpp @@ -26,7 +26,6 @@ #include #include -#include #include #include #include @@ -35,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/lock-app/mbed/main/AppTask.cpp b/examples/lock-app/mbed/main/AppTask.cpp index 5e29d76b546e3f..851d96a61b4c75 100644 --- a/examples/lock-app/mbed/main/AppTask.cpp +++ b/examples/lock-app/mbed/main/AppTask.cpp @@ -20,12 +20,12 @@ #include "BoltLockManager.h" #include -#include #include #include #include #include #include +#include #include #include diff --git a/examples/lock-app/nrfconnect/main/AppTask.cpp b/examples/lock-app/nrfconnect/main/AppTask.cpp index 3a9d375d80b86a..9919fd8374f2d4 100644 --- a/examples/lock-app/nrfconnect/main/AppTask.cpp +++ b/examples/lock-app/nrfconnect/main/AppTask.cpp @@ -29,11 +29,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp index 6faccbffd0d593..4cfcd3942369f4 100644 --- a/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -23,10 +23,10 @@ #include #include -#include #include #include #include +#include #include #include #include diff --git a/examples/lock-app/qpg/src/AppTask.cpp b/examples/lock-app/qpg/src/AppTask.cpp index cba2bfe569aa39..35d972aa7ae536 100644 --- a/examples/lock-app/qpg/src/AppTask.cpp +++ b/examples/lock-app/qpg/src/AppTask.cpp @@ -35,10 +35,10 @@ #include #include #include -#include #include #include #include +#include #include #include diff --git a/examples/log-source-app/linux/main.cpp b/examples/log-source-app/linux/main.cpp index a507d44741173b..65cb8b336fb682 100644 --- a/examples/log-source-app/linux/main.cpp +++ b/examples/log-source-app/linux/main.cpp @@ -20,11 +20,11 @@ #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/examples/ota-requestor-app/ameba/main/chipinterface.cpp b/examples/ota-requestor-app/ameba/main/chipinterface.cpp index 2a4dc911e6537c..4420de64da8861 100644 --- a/examples/ota-requestor-app/ameba/main/chipinterface.cpp +++ b/examples/ota-requestor-app/ameba/main/chipinterface.cpp @@ -24,9 +24,9 @@ #include #include -#include #include #include +#include #include #include diff --git a/examples/ota-requestor-app/genio/src/AppTask.cpp b/examples/ota-requestor-app/genio/src/AppTask.cpp index 5130c5cf9a7c61..68826454a267bc 100644 --- a/examples/ota-requestor-app/genio/src/AppTask.cpp +++ b/examples/ota-requestor-app/genio/src/AppTask.cpp @@ -18,11 +18,11 @@ */ #include #include -#include #include #include #include #include +#include #include diff --git a/examples/ota-requestor-app/mbed/main/AppTask.cpp b/examples/ota-requestor-app/mbed/main/AppTask.cpp index 5b136311903079..cad1b73b00afed 100644 --- a/examples/ota-requestor-app/mbed/main/AppTask.cpp +++ b/examples/ota-requestor-app/mbed/main/AppTask.cpp @@ -19,12 +19,12 @@ #include "AppTask.h" #include -#include #include #include #include #include #include +#include #include #include diff --git a/examples/platform/asr/init_Matter.cpp b/examples/platform/asr/init_Matter.cpp index 864823001ab53e..85fbb241ce77c2 100644 --- a/examples/platform/asr/init_Matter.cpp +++ b/examples/platform/asr/init_Matter.cpp @@ -18,12 +18,12 @@ #include "AppConfig.h" #include -#include #include #include #include #include #include +#include #include #include #ifdef CONFIG_ENABLE_CHIP_SHELL diff --git a/examples/platform/beken/common/BekenAppServer.cpp b/examples/platform/beken/common/BekenAppServer.cpp index 3216787463457a..dce9bb823e768b 100644 --- a/examples/platform/beken/common/BekenAppServer.cpp +++ b/examples/platform/beken/common/BekenAppServer.cpp @@ -19,9 +19,9 @@ #include "BekenAppServer.h" #include "CHIPDeviceManager.h" #include -#include #include #include +#include #include using namespace chip; diff --git a/examples/platform/bouffalolab/common/plat/platform.cpp b/examples/platform/bouffalolab/common/plat/platform.cpp index 4a422a9cdbc0ee..50dccc666c2a9a 100644 --- a/examples/platform/bouffalolab/common/plat/platform.cpp +++ b/examples/platform/bouffalolab/common/plat/platform.cpp @@ -17,12 +17,12 @@ */ #include #include -#include #include #include #include #include #include +#include #include #include diff --git a/examples/platform/esp32/common/Esp32AppServer.cpp b/examples/platform/esp32/common/Esp32AppServer.cpp index e88ee966db2568..978990a102f00a 100644 --- a/examples/platform/esp32/common/Esp32AppServer.cpp +++ b/examples/platform/esp32/common/Esp32AppServer.cpp @@ -23,9 +23,9 @@ #include #include #include -#include #include #include +#include #include #if CONFIG_CHIP_DEVICE_CONFIG_ENABLE_ENERGY_EVSE_TRIGGER diff --git a/examples/platform/infineon/cyw30739/matter_config.cpp b/examples/platform/infineon/cyw30739/matter_config.cpp index 0a244eabfbf37c..23fe5308baf713 100644 --- a/examples/platform/infineon/cyw30739/matter_config.cpp +++ b/examples/platform/infineon/cyw30739/matter_config.cpp @@ -37,10 +37,10 @@ #include "wiced_hal_i2c.h" #endif #include -#include #include #include #include +#include #include #include #include diff --git a/examples/platform/linux/AppMain.cpp b/examples/platform/linux/AppMain.cpp index 2f69e4da048cd0..aa437ec1203dc4 100644 --- a/examples/platform/linux/AppMain.cpp +++ b/examples/platform/linux/AppMain.cpp @@ -21,12 +21,12 @@ #include #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/examples/platform/linux/BUILD.gn b/examples/platform/linux/BUILD.gn index 478b9960cd8c77..e3d00b1db200a9 100644 --- a/examples/platform/linux/BUILD.gn +++ b/examples/platform/linux/BUILD.gn @@ -94,7 +94,7 @@ source_set("app-main") { ":energy-reporting-test-event-trigger", ":smco-test-event-trigger", ":water-heater-management-test-event-trigger", - "${chip_root}/src/app/codegen-data-model-provider:instance-header", + "${chip_root}/src/data-model-providers/codegen:instance-header", "${chip_root}/src/lib", "${chip_root}/src/platform/logging:default", ] @@ -164,8 +164,8 @@ source_set("commissioner-main") { "${chip_root}/src/lib", ] deps = [ - "${chip_root}/src/app/codegen-data-model-provider:instance-header", "${chip_root}/src/app/server", + "${chip_root}/src/data-model-providers/codegen:instance-header", ] if (chip_enable_transport_trace) { diff --git a/examples/platform/linux/CommissionerMain.cpp b/examples/platform/linux/CommissionerMain.cpp index aab4d6267c2e4c..75719017a5a380 100644 --- a/examples/platform/linux/CommissionerMain.cpp +++ b/examples/platform/linux/CommissionerMain.cpp @@ -21,12 +21,12 @@ #if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/examples/platform/nxp/common/app_task/source/AppTaskBase.cpp b/examples/platform/nxp/common/app_task/source/AppTaskBase.cpp index 596e4b8bcad78a..8490e1f1117ce7 100644 --- a/examples/platform/nxp/common/app_task/source/AppTaskBase.cpp +++ b/examples/platform/nxp/common/app_task/source/AppTaskBase.cpp @@ -26,9 +26,9 @@ #include #include -#include #include #include +#include #include diff --git a/examples/platform/nxp/se05x/linux/AppMain.cpp b/examples/platform/nxp/se05x/linux/AppMain.cpp index ffbdf5981fbab4..2d45f7dfeda0ba 100644 --- a/examples/platform/nxp/se05x/linux/AppMain.cpp +++ b/examples/platform/nxp/se05x/linux/AppMain.cpp @@ -20,11 +20,11 @@ #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/examples/platform/openiotsdk/app/openiotsdk_platform.cpp b/examples/platform/openiotsdk/app/openiotsdk_platform.cpp index f7df494997e751..d9a268c7c22f14 100644 --- a/examples/platform/openiotsdk/app/openiotsdk_platform.cpp +++ b/examples/platform/openiotsdk/app/openiotsdk_platform.cpp @@ -42,11 +42,11 @@ #include #ifdef USE_CHIP_DATA_MODEL -#include #include #include #include #include +#include #endif // USE_CHIP_DATA_MODEL #ifdef CHIP_OPEN_IOT_SDK_OTA_ENABLE diff --git a/examples/platform/silabs/MatterConfig.cpp b/examples/platform/silabs/MatterConfig.cpp index 043cd6feda032e..aba14c03e93284 100644 --- a/examples/platform/silabs/MatterConfig.cpp +++ b/examples/platform/silabs/MatterConfig.cpp @@ -56,7 +56,7 @@ static chip::DeviceLayer::Internal::Efr32PsaOperationalKeystore gOperationalKeys #include #include #include -#include +#include #ifdef SL_MATTER_TEST_EVENT_TRIGGER_ENABLED #include "SilabsTestEventTriggerDelegate.h" // nogncheck diff --git a/examples/platform/silabs/SiWx917/BUILD.gn b/examples/platform/silabs/SiWx917/BUILD.gn index 02769a993c3087..69379c11ff621e 100644 --- a/examples/platform/silabs/SiWx917/BUILD.gn +++ b/examples/platform/silabs/SiWx917/BUILD.gn @@ -189,7 +189,7 @@ source_set("siwx917-common") { public_deps += [ "${chip_root}/examples/providers:device_info_provider", - "${chip_root}/src/app/codegen-data-model-provider:instance-header", + "${chip_root}/src/data-model-providers/codegen:instance-header", "${chip_root}/src/lib", "${chip_root}/src/setup_payload", ] diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index 46cfae71ecef99..843a28e8fcfe8d 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -215,8 +215,8 @@ source_set("efr32-common") { public_deps += [ "${chip_root}/examples/providers:device_info_provider", - "${chip_root}/src/app/codegen-data-model-provider:instance-header", "${chip_root}/src/app/server", + "${chip_root}/src/data-model-providers/codegen:instance-header", "${chip_root}/src/lib", "${chip_root}/src/setup_payload", ] diff --git a/examples/platform/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp index 7ee70c33f76bf1..df1d3086ef2543 100644 --- a/examples/platform/telink/common/src/AppTaskCommon.cpp +++ b/examples/platform/telink/common/src/AppTaskCommon.cpp @@ -34,11 +34,11 @@ #include #include #include -#include #include #include #include #include +#include #if CONFIG_BOOTLOADER_MCUBOOT #include diff --git a/examples/pump-app/cc13x4_26x4/main/AppTask.cpp b/examples/pump-app/cc13x4_26x4/main/AppTask.cpp index 87bfe05f83aedf..08bd6ea4bad2c9 100644 --- a/examples/pump-app/cc13x4_26x4/main/AppTask.cpp +++ b/examples/pump-app/cc13x4_26x4/main/AppTask.cpp @@ -31,9 +31,9 @@ #include #include -#include #include #include +#include #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR #include diff --git a/examples/pump-app/nrfconnect/main/AppTask.cpp b/examples/pump-app/nrfconnect/main/AppTask.cpp index 8961c2fafbd09f..526f3b67531ad9 100644 --- a/examples/pump-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-app/nrfconnect/main/AppTask.cpp @@ -27,12 +27,12 @@ #include #include #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/examples/pump-controller-app/cc13x4_26x4/main/AppTask.cpp b/examples/pump-controller-app/cc13x4_26x4/main/AppTask.cpp index 1cb02ef522810f..0e9097e3cb48db 100644 --- a/examples/pump-controller-app/cc13x4_26x4/main/AppTask.cpp +++ b/examples/pump-controller-app/cc13x4_26x4/main/AppTask.cpp @@ -38,7 +38,7 @@ #endif #include #include -#include +#include #include #include #include diff --git a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp index d8f47f0e1eff08..a986a2c2ceca75 100644 --- a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp @@ -27,12 +27,12 @@ #include #include #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/examples/shell/cc13x4_26x4/main/AppTask.cpp b/examples/shell/cc13x4_26x4/main/AppTask.cpp index 93fd5e826ae596..c3f7a3da5b1286 100644 --- a/examples/shell/cc13x4_26x4/main/AppTask.cpp +++ b/examples/shell/cc13x4_26x4/main/AppTask.cpp @@ -22,9 +22,9 @@ #include "FreeRTOS.h" -#include #include #include +#include #include #include #include diff --git a/examples/shell/shell_common/cmd_server.cpp b/examples/shell/shell_common/cmd_server.cpp index 9f633158be76c6..eba9159a8e9a61 100644 --- a/examples/shell/shell_common/cmd_server.cpp +++ b/examples/shell/shell_common/cmd_server.cpp @@ -24,11 +24,11 @@ #include #include -#include #include #include #include #include +#include #include diff --git a/examples/thermostat/genio/src/AppTask.cpp b/examples/thermostat/genio/src/AppTask.cpp index 67daf5d1ffd2bf..2cd1c479f90fcd 100644 --- a/examples/thermostat/genio/src/AppTask.cpp +++ b/examples/thermostat/genio/src/AppTask.cpp @@ -26,10 +26,10 @@ #include #include -#include #include #include #include +#include #include diff --git a/examples/thermostat/qpg/src/AppTask.cpp b/examples/thermostat/qpg/src/AppTask.cpp index 921fc220c6099b..41342e410c88bd 100644 --- a/examples/thermostat/qpg/src/AppTask.cpp +++ b/examples/thermostat/qpg/src/AppTask.cpp @@ -27,10 +27,10 @@ #include #include -#include #include #include #include +#include #include #include diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCCommonCaseDeviceServerInitParamsProvider.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCCommonCaseDeviceServerInitParamsProvider.h index 511c7861c98161..0fec5c7b36e89b 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCCommonCaseDeviceServerInitParamsProvider.h +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCCommonCaseDeviceServerInitParamsProvider.h @@ -17,7 +17,7 @@ #include "core/Types.h" -#include +#include #ifndef MCCommonCaseDeviceServerInitParamsProvider_h #define MCCommonCaseDeviceServerInitParamsProvider_h diff --git a/examples/tv-casting-app/linux/main.cpp b/examples/tv-casting-app/linux/main.cpp index d73431d1fb97ea..dcdd25dd33f8af 100644 --- a/examples/tv-casting-app/linux/main.cpp +++ b/examples/tv-casting-app/linux/main.cpp @@ -33,11 +33,11 @@ #include "LinuxCommissionableDataProvider.h" #include "Options.h" -#include #include #include #include #include +#include #include using namespace chip; diff --git a/examples/tv-casting-app/linux/simple-app.cpp b/examples/tv-casting-app/linux/simple-app.cpp index c41ebe0fc460a0..5697b269a24473 100644 --- a/examples/tv-casting-app/linux/simple-app.cpp +++ b/examples/tv-casting-app/linux/simple-app.cpp @@ -26,11 +26,11 @@ #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/examples/window-app/nrfconnect/main/AppTask.cpp b/examples/window-app/nrfconnect/main/AppTask.cpp index 06f21e0eaf8109..2cfbab9a6b6c47 100644 --- a/examples/window-app/nrfconnect/main/AppTask.cpp +++ b/examples/window-app/nrfconnect/main/AppTask.cpp @@ -27,12 +27,12 @@ #include #include #include -#include #include #include #include #include #include +#include #if CONFIG_CHIP_OTA_REQUESTOR #include "OTAUtil.h" diff --git a/src/BUILD.gn b/src/BUILD.gn index baf3c69720da9e..8eac76615c63c8 100644 --- a/src/BUILD.gn +++ b/src/BUILD.gn @@ -89,11 +89,11 @@ if (chip_build_tests) { # Avoid these items from "one single binary" test executions. Once tests # are split, we can re-visit this (and likely many others). # - # In particular: "app/codegen-data-model-provider/tests" contains + # In particular: "data-model-providers/codegen/tests" contains # symbols for ember mocks which are used by other tests. tests += [ - "${chip_root}/src/app/codegen-data-model-provider/tests", + "${chip_root}/src/data-model-providers/codegen/tests", "${chip_root}/src/setup_payload/tests", "${chip_root}/src/transport/raw/tests", ] diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake index 5afb1735e46207..7c5ab0f82608b4 100644 --- a/src/app/chip_data_model.cmake +++ b/src/app/chip_data_model.cmake @@ -17,7 +17,7 @@ set(CHIP_APP_BASE_DIR ${CMAKE_CURRENT_LIST_DIR}) include("${CHIP_ROOT}/build/chip/chip_codegen.cmake") -include("${CHIP_ROOT}/src/app/codegen-data-model-provider/model.cmake") +include("${CHIP_ROOT}/src/data-model-providers/codegen/model.cmake") # Configure ${APP_TARGET} with source files associated with ${CLUSTER} cluster # diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index 7d8cfac7f7b0d9..02be8ebaccf05b 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -15,8 +15,8 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") import("${chip_root}/build/chip/chip_codegen.gni") -import("${chip_root}/src/app/codegen-data-model-provider/model.gni") import("${chip_root}/src/app/common_flags.gni") +import("${chip_root}/src/data-model-providers/codegen/model.gni") import("${chip_root}/src/platform/python.gni") _app_root = get_path_info(".", "abspath") diff --git a/src/app/server/java/AndroidAppServerWrapper.cpp b/src/app/server/java/AndroidAppServerWrapper.cpp index 1c0264eb6af244..15d2d8fa6955e8 100644 --- a/src/app/server/java/AndroidAppServerWrapper.cpp +++ b/src/app/server/java/AndroidAppServerWrapper.cpp @@ -18,11 +18,11 @@ #include "AndroidAppServerWrapper.h" -#include #include #include #include #include +#include #include #include #include diff --git a/src/app/server/java/BUILD.gn b/src/app/server/java/BUILD.gn index 98012409b1ee56..deb85f7da22adc 100644 --- a/src/app/server/java/BUILD.gn +++ b/src/app/server/java/BUILD.gn @@ -36,8 +36,8 @@ static_library("jni") { ] deps = [ - "${chip_root}/src/app/codegen-data-model-provider:instance-header", "${chip_root}/src/app/server", + "${chip_root}/src/data-model-providers/codegen:instance-header", "${chip_root}/src/inet", "${chip_root}/src/lib", "${chip_root}/src/platform", diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index 92ba164b7cddf1..912c1e32a0ef5a 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -248,7 +248,6 @@ chip_test_suite("tests") { ":time-sync-data-provider-test-srcs", "${chip_root}/src/app", "${chip_root}/src/app:attribute-persistence", - "${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", @@ -256,6 +255,7 @@ chip_test_suite("tests") { "${chip_root}/src/app/tests:helpers", "${chip_root}/src/app/util/mock:mock_codegen_data_model", "${chip_root}/src/app/util/mock:mock_ember", + "${chip_root}/src/data-model-providers/codegen:instance-header", "${chip_root}/src/lib/core", "${chip_root}/src/lib/core:string-builder-adapters", "${chip_root}/src/lib/support:test_utils", diff --git a/src/app/tests/TestAclEvent.cpp b/src/app/tests/TestAclEvent.cpp index 4607d48d618ccc..5610d18ed6015c 100644 --- a/src/app/tests/TestAclEvent.cpp +++ b/src/app/tests/TestAclEvent.cpp @@ -24,13 +24,13 @@ #include #include #include -#include #include #include #include #include #include #include +#include #include #include #include diff --git a/src/app/tests/TestAttributePathExpandIterator.cpp b/src/app/tests/TestAttributePathExpandIterator.cpp index fb8fa9b2c9621f..913b07e86fb829 100644 --- a/src/app/tests/TestAttributePathExpandIterator.cpp +++ b/src/app/tests/TestAttributePathExpandIterator.cpp @@ -20,8 +20,8 @@ #include #include #include -#include #include +#include #include #include #include diff --git a/src/app/tests/TestCommissioningWindowManager.cpp b/src/app/tests/TestCommissioningWindowManager.cpp index e6a9069b533e55..7d1e22626b29dd 100644 --- a/src/app/tests/TestCommissioningWindowManager.cpp +++ b/src/app/tests/TestCommissioningWindowManager.cpp @@ -17,11 +17,11 @@ #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/src/app/tests/TestInteractionModelEngine.cpp b/src/app/tests/TestInteractionModelEngine.cpp index 2778d924abee78..30ca7d0001f01b 100644 --- a/src/app/tests/TestInteractionModelEngine.cpp +++ b/src/app/tests/TestInteractionModelEngine.cpp @@ -18,12 +18,12 @@ #include #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index 564320b67f17ce..21b15d1a808048 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -29,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/tests/TestReportScheduler.cpp b/src/app/tests/TestReportScheduler.cpp index 49cd2ba07230a9..03dda963aef6ba 100644 --- a/src/app/tests/TestReportScheduler.cpp +++ b/src/app/tests/TestReportScheduler.cpp @@ -17,10 +17,10 @@ */ #include -#include #include #include #include +#include #include #include #include diff --git a/src/app/tests/TestReportingEngine.cpp b/src/app/tests/TestReportingEngine.cpp index dc33e30c042a53..60852e2c033c91 100644 --- a/src/app/tests/TestReportingEngine.cpp +++ b/src/app/tests/TestReportingEngine.cpp @@ -28,11 +28,11 @@ #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/src/app/tests/test-interaction-model-api.cpp b/src/app/tests/test-interaction-model-api.cpp index 71e7d93036005a..1de18681b5a223 100644 --- a/src/app/tests/test-interaction-model-api.cpp +++ b/src/app/tests/test-interaction-model-api.cpp @@ -18,11 +18,11 @@ #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/src/app/util/mock/BUILD.gn b/src/app/util/mock/BUILD.gn index 0b99d827403047..5147b447f2c72a 100644 --- a/src/app/util/mock/BUILD.gn +++ b/src/app/util/mock/BUILD.gn @@ -14,7 +14,7 @@ import("//build_overrides/chip.gni") -import("${chip_root}/src/app/codegen-data-model-provider/model.gni") +import("${chip_root}/src/data-model-providers/codegen/model.gni") config("mock_include") { include_dirs = [ "include" ] diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index 704d9bacd29570..d343765747ea77 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -25,12 +25,12 @@ #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index d969612f375de1..f8eeee3fd7b93b 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -19,8 +19,8 @@ import("${chip_root}/build/chip/buildconfig_header.gni") import("${chip_root}/build/chip/java/config.gni") import("${chip_root}/build/chip/java/rules.gni") import("${chip_root}/build/chip/tests.gni") -import("${chip_root}/src/app/codegen-data-model-provider/model.gni") import("${chip_root}/src/app/common_flags.gni") +import("${chip_root}/src/data-model-providers/codegen/model.gni") import("${chip_root}/src/platform/device.gni") buildconfig_header("controller_buildconfig") { diff --git a/src/controller/python/ChipDeviceController-ScriptBinding.cpp b/src/controller/python/ChipDeviceController-ScriptBinding.cpp index 6430776a6e8b0d..f4c469fbef33af 100644 --- a/src/controller/python/ChipDeviceController-ScriptBinding.cpp +++ b/src/controller/python/ChipDeviceController-ScriptBinding.cpp @@ -42,7 +42,6 @@ #include #include -#include #include #include #include @@ -55,6 +54,7 @@ #include #include #include +#include #include #include diff --git a/src/controller/python/chip/internal/CommissionerImpl.cpp b/src/controller/python/chip/internal/CommissionerImpl.cpp index b86dad3f916084..8cf94f2c968a7f 100644 --- a/src/controller/python/chip/internal/CommissionerImpl.cpp +++ b/src/controller/python/chip/internal/CommissionerImpl.cpp @@ -16,7 +16,6 @@ */ #include -#include #include #include #include @@ -27,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/src/controller/python/chip/server/ServerInit.cpp b/src/controller/python/chip/server/ServerInit.cpp index 9089237aa41c7e..ca1efee777b629 100644 --- a/src/controller/python/chip/server/ServerInit.cpp +++ b/src/controller/python/chip/server/ServerInit.cpp @@ -18,9 +18,9 @@ #include #include -#include #include #include +#include #include #include diff --git a/src/controller/tests/TestEventChunking.cpp b/src/controller/tests/TestEventChunking.cpp index 8fa260da41c712..80cd0707b63dfd 100644 --- a/src/controller/tests/TestEventChunking.cpp +++ b/src/controller/tests/TestEventChunking.cpp @@ -30,12 +30,12 @@ #include #include #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/src/controller/tests/TestReadChunking.cpp b/src/controller/tests/TestReadChunking.cpp index d05c1fe522c42d..3d2676e7f4c440 100644 --- a/src/controller/tests/TestReadChunking.cpp +++ b/src/controller/tests/TestReadChunking.cpp @@ -25,7 +25,7 @@ #include "app-common/zap-generated/ids/Attributes.h" #include "app-common/zap-generated/ids/Clusters.h" #include "app/ConcreteAttributePath.h" -#include "app/codegen-data-model-provider/Instance.h" +#include "data-model-providers/codegen/Instance.h" #include "protocols/interaction_model/Constants.h" #include #include diff --git a/src/controller/tests/TestServerCommandDispatch.cpp b/src/controller/tests/TestServerCommandDispatch.cpp index a09d2537f377bf..2389ce08e6baf2 100644 --- a/src/controller/tests/TestServerCommandDispatch.cpp +++ b/src/controller/tests/TestServerCommandDispatch.cpp @@ -23,12 +23,12 @@ #include #include #include -#include -#include #include #include #include #include +#include +#include #include #include #include diff --git a/src/controller/tests/TestWriteChunking.cpp b/src/controller/tests/TestWriteChunking.cpp index 39c73c7e7b28aa..ba96f53548cf25 100644 --- a/src/controller/tests/TestWriteChunking.cpp +++ b/src/controller/tests/TestWriteChunking.cpp @@ -30,12 +30,12 @@ #include #include #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/src/controller/tests/data_model/DataModelFixtures.cpp b/src/controller/tests/data_model/DataModelFixtures.cpp index c0054043fe4bbf..6cb4f114c3d1ef 100644 --- a/src/controller/tests/data_model/DataModelFixtures.cpp +++ b/src/controller/tests/data_model/DataModelFixtures.cpp @@ -26,8 +26,8 @@ #include #include #include -#include #include +#include #include #include #include diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index e0c5f8283aa189..f4e968a72cf268 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -50,7 +50,6 @@ #import -#include #include #include #include @@ -59,6 +58,7 @@ #include #include #include +#include #include #include #include diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index f934f91dfbccb7..1de3c69f2f1417 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -757,10 +757,10 @@ 75139A6C2B7FE19100E3A919 /* MTRTestDeclarations.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRTestDeclarations.h; sourceTree = ""; }; 75139A6D2B7FE5D600E3A919 /* MTRDeviceControllerLocalTestStorage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerLocalTestStorage.h; sourceTree = ""; }; 75139A6E2B7FE5E900E3A919 /* MTRDeviceControllerLocalTestStorage.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceControllerLocalTestStorage.mm; sourceTree = ""; }; - 7534D1762CF8CDDF00F64654 /* AttributePersistenceProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AttributePersistenceProvider.h; path = ../../app/util/persistence/AttributePersistenceProvider.h; sourceTree = ""; }; - 7534D1772CF8CDDF00F64654 /* AttributePersistenceProvider.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = AttributePersistenceProvider.cpp; path = ../../app/util/persistence/AttributePersistenceProvider.cpp; sourceTree = ""; }; - 7534D17C2CF8CE2000F64654 /* DefaultAttributePersistenceProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DefaultAttributePersistenceProvider.h; path = ../../app/util/persistence/DefaultAttributePersistenceProvider.h; sourceTree = ""; }; - 7534D17D2CF8CE2000F64654 /* DefaultAttributePersistenceProvider.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = DefaultAttributePersistenceProvider.cpp; path = ../../app/util/persistence/DefaultAttributePersistenceProvider.cpp; sourceTree = ""; }; + 7534D1762CF8CDDF00F64654 /* AttributePersistenceProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AttributePersistenceProvider.h; sourceTree = ""; }; + 7534D1772CF8CDDF00F64654 /* AttributePersistenceProvider.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AttributePersistenceProvider.cpp; sourceTree = ""; }; + 7534D17C2CF8CE2000F64654 /* DefaultAttributePersistenceProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DefaultAttributePersistenceProvider.h; sourceTree = ""; }; + 7534D17D2CF8CE2000F64654 /* DefaultAttributePersistenceProvider.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DefaultAttributePersistenceProvider.cpp; sourceTree = ""; }; 7534F12628BFF20300390851 /* MTRDeviceAttestationDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceAttestationDelegate.mm; sourceTree = ""; }; 7534F12728BFF20300390851 /* MTRDeviceAttestationDelegate_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceAttestationDelegate_Internal.h; sourceTree = ""; }; 754784632BFE65B70089C372 /* MTRDeviceStorageBehaviorConfiguration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDeviceStorageBehaviorConfiguration.h; sourceTree = ""; }; @@ -1359,7 +1359,8 @@ 7592BCF12CBEE98C00EB74A0 /* Instance.h */, 7592BCF22CBEE98C00EB74A0 /* Instance.cpp */, ); - path = "codegen-data-model-provider"; + name = "codegen-data-model-provider"; + path = "../data-model-providers/codegen"; sourceTree = ""; }; 7534D1822CF8CE2C00F64654 /* persistence */ = { @@ -1370,7 +1371,8 @@ 7534D1762CF8CDDF00F64654 /* AttributePersistenceProvider.h */, 7534D1772CF8CDDF00F64654 /* AttributePersistenceProvider.cpp */, ); - path = persistence; + name = persistence; + path = util/persistence; sourceTree = ""; }; 75A202E72BA8DBB700A771DD /* reporting */ = { diff --git a/src/app/codegen-data-model-provider/BUILD.gn b/src/data-model-providers/codegen/BUILD.gn similarity index 100% rename from src/app/codegen-data-model-provider/BUILD.gn rename to src/data-model-providers/codegen/BUILD.gn diff --git a/src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp b/src/data-model-providers/codegen/CodegenDataModelProvider.cpp similarity index 99% rename from src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp rename to src/data-model-providers/codegen/CodegenDataModelProvider.cpp index a353cd1c5d4c55..95bac8fbbf82f3 100644 --- a/src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp +++ b/src/data-model-providers/codegen/CodegenDataModelProvider.cpp @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include +#include #include #include diff --git a/src/app/codegen-data-model-provider/CodegenDataModelProvider.h b/src/data-model-providers/codegen/CodegenDataModelProvider.h similarity index 100% rename from src/app/codegen-data-model-provider/CodegenDataModelProvider.h rename to src/data-model-providers/codegen/CodegenDataModelProvider.h diff --git a/src/app/codegen-data-model-provider/CodegenDataModelProvider_Read.cpp b/src/data-model-providers/codegen/CodegenDataModelProvider_Read.cpp similarity index 96% rename from src/app/codegen-data-model-provider/CodegenDataModelProvider_Read.cpp rename to src/data-model-providers/codegen/CodegenDataModelProvider_Read.cpp index 88989b52071810..2c2ed3102e8850 100644 --- a/src/app/codegen-data-model-provider/CodegenDataModelProvider_Read.cpp +++ b/src/data-model-providers/codegen/CodegenDataModelProvider_Read.cpp @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include +#include #include #include @@ -28,8 +28,6 @@ #include #include #include -#include -#include #include #include #include @@ -40,6 +38,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp b/src/data-model-providers/codegen/CodegenDataModelProvider_Write.cpp similarity index 98% rename from src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp rename to src/data-model-providers/codegen/CodegenDataModelProvider_Write.cpp index 10e03ae4844487..1eb25f122d3b36 100644 --- a/src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp +++ b/src/data-model-providers/codegen/CodegenDataModelProvider_Write.cpp @@ -14,15 +14,13 @@ * 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 @@ -35,6 +33,8 @@ #include #include #include +#include +#include #include #include diff --git a/src/app/codegen-data-model-provider/EmberAttributeDataBuffer.cpp b/src/data-model-providers/codegen/EmberAttributeDataBuffer.cpp similarity index 99% rename from src/app/codegen-data-model-provider/EmberAttributeDataBuffer.cpp rename to src/data-model-providers/codegen/EmberAttributeDataBuffer.cpp index 1296e7190833fd..84ad9de070ff2d 100644 --- a/src/app/codegen-data-model-provider/EmberAttributeDataBuffer.cpp +++ b/src/data-model-providers/codegen/EmberAttributeDataBuffer.cpp @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include +#include #include #include diff --git a/src/app/codegen-data-model-provider/EmberAttributeDataBuffer.h b/src/data-model-providers/codegen/EmberAttributeDataBuffer.h similarity index 100% rename from src/app/codegen-data-model-provider/EmberAttributeDataBuffer.h rename to src/data-model-providers/codegen/EmberAttributeDataBuffer.h diff --git a/src/app/codegen-data-model-provider/EmberMetadata.cpp b/src/data-model-providers/codegen/EmberMetadata.cpp similarity index 97% rename from src/app/codegen-data-model-provider/EmberMetadata.cpp rename to src/data-model-providers/codegen/EmberMetadata.cpp index 69f9e3e889369c..22e31a569fe702 100644 --- a/src/app/codegen-data-model-provider/EmberMetadata.cpp +++ b/src/data-model-providers/codegen/EmberMetadata.cpp @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include +#include #include #include diff --git a/src/app/codegen-data-model-provider/EmberMetadata.h b/src/data-model-providers/codegen/EmberMetadata.h similarity index 100% rename from src/app/codegen-data-model-provider/EmberMetadata.h rename to src/data-model-providers/codegen/EmberMetadata.h diff --git a/src/app/codegen-data-model-provider/Instance.cpp b/src/data-model-providers/codegen/Instance.cpp similarity index 89% rename from src/app/codegen-data-model-provider/Instance.cpp rename to src/data-model-providers/codegen/Instance.cpp index 3321106dd90ade..bcf52f2b8821e2 100644 --- a/src/app/codegen-data-model-provider/Instance.cpp +++ b/src/data-model-providers/codegen/Instance.cpp @@ -15,8 +15,8 @@ * limitations under the License. */ #include "lib/core/CHIPPersistentStorageDelegate.h" -#include -#include +#include +#include namespace chip { namespace app { diff --git a/src/app/codegen-data-model-provider/Instance.h b/src/data-model-providers/codegen/Instance.h similarity index 100% rename from src/app/codegen-data-model-provider/Instance.h rename to src/data-model-providers/codegen/Instance.h diff --git a/src/app/codegen-data-model-provider/model.cmake b/src/data-model-providers/codegen/model.cmake similarity index 100% rename from src/app/codegen-data-model-provider/model.cmake rename to src/data-model-providers/codegen/model.cmake diff --git a/src/app/codegen-data-model-provider/model.gni b/src/data-model-providers/codegen/model.gni similarity index 64% rename from src/app/codegen-data-model-provider/model.gni rename to src/data-model-providers/codegen/model.gni index 12c2711fdadf7f..51305a5fe30b5a 100644 --- a/src/app/codegen-data-model-provider/model.gni +++ b/src/data-model-providers/codegen/model.gni @@ -25,20 +25,20 @@ import("//build_overrides/chip.gni") # be cleanly built as a stand-alone and instead have to be imported as part of # a different data model or compilation unit. codegen_data_model_SOURCES = [ - "${chip_root}/src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp", - "${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", + "${chip_root}/src/data-model-providers/codegen/CodegenDataModelProvider.cpp", + "${chip_root}/src/data-model-providers/codegen/CodegenDataModelProvider.h", + "${chip_root}/src/data-model-providers/codegen/CodegenDataModelProvider_Read.cpp", + "${chip_root}/src/data-model-providers/codegen/CodegenDataModelProvider_Write.cpp", + "${chip_root}/src/data-model-providers/codegen/EmberAttributeDataBuffer.cpp", + "${chip_root}/src/data-model-providers/codegen/EmberAttributeDataBuffer.h", + "${chip_root}/src/data-model-providers/codegen/EmberMetadata.cpp", + "${chip_root}/src/data-model-providers/codegen/EmberMetadata.h", + "${chip_root}/src/data-model-providers/codegen/Instance.cpp", ] codegen_data_model_PUBLIC_DEPS = [ "${chip_root}/src/app/common:attribute-type", "${chip_root}/src/app/data-model-provider", - "${chip_root}/src/app/codegen-data-model-provider:instance-header", + "${chip_root}/src/data-model-providers/codegen:instance-header", "${chip_root}/src/app/util/persistence", ] diff --git a/src/app/codegen-data-model-provider/tests/BUILD.gn b/src/data-model-providers/codegen/tests/BUILD.gn similarity index 96% rename from src/app/codegen-data-model-provider/tests/BUILD.gn rename to src/data-model-providers/codegen/tests/BUILD.gn index 5bcfb9d911ab55..af14185ddbd9b1 100644 --- a/src/app/codegen-data-model-provider/tests/BUILD.gn +++ b/src/data-model-providers/codegen/tests/BUILD.gn @@ -13,7 +13,7 @@ # limitations under the License. import("//build_overrides/chip.gni") import("${chip_root}/build/chip/chip_test_suite.gni") -import("${chip_root}/src/app/codegen-data-model-provider/model.gni") +import("${chip_root}/src/data-model-providers/codegen/model.gni") source_set("ember_extra_files") { sources = [ diff --git a/src/app/codegen-data-model-provider/tests/EmberInvokeOverride.cpp b/src/data-model-providers/codegen/tests/EmberInvokeOverride.cpp similarity index 100% rename from src/app/codegen-data-model-provider/tests/EmberInvokeOverride.cpp rename to src/data-model-providers/codegen/tests/EmberInvokeOverride.cpp diff --git a/src/app/codegen-data-model-provider/tests/EmberInvokeOverride.h b/src/data-model-providers/codegen/tests/EmberInvokeOverride.h similarity index 100% rename from src/app/codegen-data-model-provider/tests/EmberInvokeOverride.h rename to src/data-model-providers/codegen/tests/EmberInvokeOverride.h diff --git a/src/app/codegen-data-model-provider/tests/EmberReadWriteOverride.cpp b/src/data-model-providers/codegen/tests/EmberReadWriteOverride.cpp similarity index 100% rename from src/app/codegen-data-model-provider/tests/EmberReadWriteOverride.cpp rename to src/data-model-providers/codegen/tests/EmberReadWriteOverride.cpp diff --git a/src/app/codegen-data-model-provider/tests/EmberReadWriteOverride.h b/src/data-model-providers/codegen/tests/EmberReadWriteOverride.h similarity index 100% rename from src/app/codegen-data-model-provider/tests/EmberReadWriteOverride.h rename to src/data-model-providers/codegen/tests/EmberReadWriteOverride.h diff --git a/src/app/codegen-data-model-provider/tests/InteractionModelTemporaryOverrides.cpp b/src/data-model-providers/codegen/tests/InteractionModelTemporaryOverrides.cpp similarity index 100% rename from src/app/codegen-data-model-provider/tests/InteractionModelTemporaryOverrides.cpp rename to src/data-model-providers/codegen/tests/InteractionModelTemporaryOverrides.cpp diff --git a/src/app/codegen-data-model-provider/tests/TestCodegenModelViaMocks.cpp b/src/data-model-providers/codegen/tests/TestCodegenModelViaMocks.cpp similarity index 99% rename from src/app/codegen-data-model-provider/tests/TestCodegenModelViaMocks.cpp rename to src/data-model-providers/codegen/tests/TestCodegenModelViaMocks.cpp index 5f47f1abda0498..302d26a8941cd0 100644 --- a/src/app/codegen-data-model-provider/tests/TestCodegenModelViaMocks.cpp +++ b/src/data-model-providers/codegen/tests/TestCodegenModelViaMocks.cpp @@ -17,8 +17,8 @@ #include -#include -#include +#include +#include #include #include @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -51,6 +50,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/codegen-data-model-provider/tests/TestEmberAttributeDataBuffer.cpp b/src/data-model-providers/codegen/tests/TestEmberAttributeDataBuffer.cpp similarity index 99% rename from src/app/codegen-data-model-provider/tests/TestEmberAttributeDataBuffer.cpp rename to src/data-model-providers/codegen/tests/TestEmberAttributeDataBuffer.cpp index 04e8b94dcce809..e33c5b6e74c5e5 100644 --- a/src/app/codegen-data-model-provider/tests/TestEmberAttributeDataBuffer.cpp +++ b/src/data-model-providers/codegen/tests/TestEmberAttributeDataBuffer.cpp @@ -18,7 +18,7 @@ #include -#include +#include #include #include From 5d42d920de46da694d69ddc6500faf5834638e72 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 9 Dec 2024 20:03:50 -0500 Subject: [PATCH 09/72] Add a helper method to get the descriptor cluster info from MTRDevice. (#36769) --- src/darwin/Framework/CHIP/MTRDevice.h | 9 +++++++ src/darwin/Framework/CHIP/MTRDevice.mm | 26 +++++++++++++++++++ .../Framework/CHIPTests/MTRDeviceTests.m | 16 ++++++++++++ 3 files changed, 51 insertions(+) diff --git a/src/darwin/Framework/CHIP/MTRDevice.h b/src/darwin/Framework/CHIP/MTRDevice.h index b1ca179df658f7..ae355605626ad9 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.h +++ b/src/darwin/Framework/CHIP/MTRDevice.h @@ -221,6 +221,15 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) */ - (NSArray *> *)readAttributePaths:(NSArray *)attributePaths MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2)); +/** + * Read all known attributes from descriptor clusters on all known endpoints. + * + * @return A dictionary with the paths of the attributes as keys and the + * data-values (as described in the documentation for + * MTRDeviceResponseHandler) as values. + */ +- (NSDictionary *> *)descriptorClusters MTR_NEWLY_AVAILABLE; + /** * Invoke a command with a designated command path * diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index 7f273e26f03399..4bf71496b0cf1f 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -363,6 +363,32 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID return [NSArray array]; } +- (NSDictionary *> *)descriptorClusters +{ + @autoreleasepool { + // For now, we have a temp array that we should make sure dies as soon + // as possible. + // + // TODO: We should have a version of readAttributePaths that returns a + // dictionary in the format we want here. + auto path = [MTRAttributeRequestPath requestPathWithEndpointID:nil + clusterID:@(MTRClusterIDTypeDescriptorID) + attributeID:nil]; + auto * data = [self readAttributePaths:@[ path ]]; + + auto * retval = [NSMutableDictionary dictionaryWithCapacity:data.count]; + for (NSDictionary * item in data) { + // We double-check that the things in our dictionaries are the right + // thing, because XPC has no way to check that for us. + if (MTR_SAFE_CAST(item[MTRAttributePathKey], MTRAttributePath) && MTR_SAFE_CAST(item[MTRDataKey], NSDictionary)) { + retval[item[MTRAttributePathKey]] = item[MTRDataKey]; + } + } + + return retval; + } +} + - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID commandID:(NSNumber *)commandID diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index 6cabe01cb567ed..729e7a318a9213 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -1588,6 +1588,22 @@ - (void)test017_TestMTRDeviceBasics XCTAssertEqualObjects([NSSet setWithArray:variousThings], [[NSSet setWithArray:clusterRevisions] setByAddingObjectsFromSet:[NSSet setWithArray:basicInformationAllRootAttributes]]); + // Quick test for descriptorClusters + __auto_type * descriptorPath = [MTRAttributeRequestPath requestPathWithEndpointID:nil clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:nil]; + __auto_type * descriptorRead = [device descriptorClusters]; + __auto_type * descriptorWildcardRead = [device readAttributePaths:@[ descriptorPath ]]; + XCTAssertEqual(descriptorRead.count, descriptorWildcardRead.count); + for (MTRAttributePath * path in descriptorRead) { + __auto_type * expectedObj = @{ + MTRAttributePathKey : path, + MTRDataKey : descriptorRead[path], + }; + XCTAssertTrue([descriptorWildcardRead containsObject:expectedObj]); + } + for (NSDictionary * item in descriptorWildcardRead) { + XCTAssertEqualObjects(descriptorRead[item[MTRAttributePathKey]], item[MTRDataKey]); + } + // Some quick tests for waitForAttributeValues. First, values that we know // are already there: XCTestExpectation * deviceTypesWaitExpectation = [self expectationWithDescription:@"deviceTypes is already the value we expect"]; From 8606290529ea3025806c6fd5352576c42ead63f0 Mon Sep 17 00:00:00 2001 From: Sergio Soares Date: Tue, 10 Dec 2024 04:53:11 -0500 Subject: [PATCH 10/72] Don't use default ctor for ChipDeviceEvent (#36768) * Don't use default ctor for ChipDeviceEvent * Restyled by clang-format --------- Co-authored-by: Restyled.io --- src/lib/dnssd/Discovery_ImplPlatform.cpp | 8 +++----- src/protocols/secure_channel/PairingSession.cpp | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/lib/dnssd/Discovery_ImplPlatform.cpp b/src/lib/dnssd/Discovery_ImplPlatform.cpp index 6f98ac71b34a38..e83a88915f2ea4 100644 --- a/src/lib/dnssd/Discovery_ImplPlatform.cpp +++ b/src/lib/dnssd/Discovery_ImplPlatform.cpp @@ -452,8 +452,7 @@ void DiscoveryImplPlatform::HandleDnssdInit(void * context, CHIP_ERROR initError publisher->mState = State::kInitialized; // Post an event that will start advertising - DeviceLayer::ChipDeviceEvent event; - event.Type = DeviceLayer::DeviceEventType::kDnssdInitialized; + DeviceLayer::ChipDeviceEvent event{ .Type = DeviceLayer::DeviceEventType::kDnssdInitialized }; CHIP_ERROR error = DeviceLayer::PlatformMgr().PostEvent(&event); if (error != CHIP_NO_ERROR) @@ -477,9 +476,8 @@ void DiscoveryImplPlatform::HandleDnssdError(void * context, CHIP_ERROR error) // Restore dnssd state before restart, also needs to call ChipDnssdShutdown() publisher->Shutdown(); - DeviceLayer::ChipDeviceEvent event; - event.Type = DeviceLayer::DeviceEventType::kDnssdRestartNeeded; - error = DeviceLayer::PlatformMgr().PostEvent(&event); + DeviceLayer::ChipDeviceEvent event{ .Type = DeviceLayer::DeviceEventType::kDnssdRestartNeeded }; + error = DeviceLayer::PlatformMgr().PostEvent(&event); if (error != CHIP_NO_ERROR) { diff --git a/src/protocols/secure_channel/PairingSession.cpp b/src/protocols/secure_channel/PairingSession.cpp index 6176d097c5118a..49f80713d8ed8c 100644 --- a/src/protocols/secure_channel/PairingSession.cpp +++ b/src/protocols/secure_channel/PairingSession.cpp @@ -81,8 +81,7 @@ void PairingSession::Finish() if (err == CHIP_NO_ERROR) { VerifyOrDie(mSecureSessionHolder); - DeviceLayer::ChipDeviceEvent event; - event.Type = DeviceLayer::DeviceEventType::kSecureSessionEstablished; + DeviceLayer::ChipDeviceEvent event{ .Type = DeviceLayer::DeviceEventType::kSecureSessionEstablished }; event.SecureSessionEstablished.TransportType = to_underlying(address.GetTransportType()); event.SecureSessionEstablished.SecureSessionType = to_underlying(mSecureSessionHolder->AsSecureSession()->GetSecureSessionType()); From 43167a00c540cac1815eceada793ebec7508769a Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 10 Dec 2024 18:11:06 +0100 Subject: [PATCH 11/72] [Darwin] Print the queue name (or a shorter version for common queues) when using the stdio logging backend (#36764) * [Darwin] Print the queue name (or a shorter version for common queues) when using the stdio logging backend * [darwin-framework-tool] Print the queue name (or a shorter version for common queues) when logging --- .../darwin-framework-tool/logging/logging.mm | 15 +++- src/platform/Darwin/BUILD.gn | 2 + src/platform/Darwin/DispatchQueueNames.cpp | 81 +++++++++++++++++++ src/platform/Darwin/DispatchQueueNames.h | 27 +++++++ src/platform/logging/impl/Stdio.cpp | 4 +- 5 files changed, 125 insertions(+), 4 deletions(-) create mode 100644 src/platform/Darwin/DispatchQueueNames.cpp create mode 100644 src/platform/Darwin/DispatchQueueNames.h diff --git a/examples/darwin-framework-tool/logging/logging.mm b/examples/darwin-framework-tool/logging/logging.mm index a596ee0eae2a9c..2a3469649f69c5 100644 --- a/examples/darwin-framework-tool/logging/logging.mm +++ b/examples/darwin-framework-tool/logging/logging.mm @@ -23,6 +23,7 @@ #include #include #include +#include #include namespace dft { @@ -56,9 +57,17 @@ void LogMessage(MTRLogType type, NSString * component, NSString * message) int pid = [[NSProcessInfo processInfo] processIdentifier]; auto tid = pthread_mach_thread_np(pthread_self()); - - fprintf(stdout, "%s%s [%d:%u] [%s]: %s%s\n", loggingColor.UTF8String, formattedDate.UTF8String, pid, tid, - component.UTF8String, message.UTF8String, kLoggingColorEnd.UTF8String); + const char * label = chip::darwin::queues::CurrentLabel(); + + fprintf(stdout, "%s%s [%d:%u:%s] [%s]: %s%s\n", + loggingColor.UTF8String, + formattedDate.UTF8String, + pid, + tid, + label, + component.UTF8String, + message.UTF8String, + kLoggingColorEnd.UTF8String); } void LogRedirectCallback(const char * moduleName, uint8_t category, const char * format, va_list args) diff --git a/src/platform/Darwin/BUILD.gn b/src/platform/Darwin/BUILD.gn index 0a56ce1eac4364..659c7a03a7af30 100644 --- a/src/platform/Darwin/BUILD.gn +++ b/src/platform/Darwin/BUILD.gn @@ -149,6 +149,8 @@ source_set("tracing") { static_library("logging") { sources = [ + "DispatchQueueNames.cpp", + "DispatchQueueNames.h", "Logging.h", "Logging.mm", ] diff --git a/src/platform/Darwin/DispatchQueueNames.cpp b/src/platform/Darwin/DispatchQueueNames.cpp new file mode 100644 index 00000000000000..2dff48b9bad932 --- /dev/null +++ b/src/platform/Darwin/DispatchQueueNames.cpp @@ -0,0 +1,81 @@ +/* + * 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 "DispatchQueueNames.h" + +#include + +namespace { +constexpr const char * kMainQueue = "com.apple.main-thread"; +constexpr const char * kChipQueue = "org.csa-iot.matter.workqueue"; +constexpr const char * kBleQueue = "org.csa-iot.matter.framework.ble.workqueue"; +constexpr const char * kXPCQueue = "org.csa-iot.matter.framework.xpc.workqueue"; +constexpr const char * kDeviceQueue = "org.csa-iot.matter.framework.device.workqueue"; +constexpr const char * kOTAProviderQueue = "org.csa-iot.matter.framework.otaprovider.workqueue"; +constexpr const char * kDeviceAttestationQueue = "org.csa-iot.matter.framework.device_attestation.workqueue"; + +constexpr const char * kMainQueueShort = "main"; +constexpr const char * kChipQueueShort = "chip"; +constexpr const char * kBleQueueShort = "ble"; +constexpr const char * kXPCQueueShort = "xpc"; +constexpr const char * kDeviceQueueShort = "device"; +constexpr const char * kOTAProviderQueueShort = "ota-provider"; +constexpr const char * kDeviceAttestationQueueShort = "device-attestation"; +} // namespace + +namespace chip { +namespace darwin { +namespace queues { + +const char * CurrentLabel() +{ + const char * label = dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL); + + if (strcmp(label, kMainQueue) == 0) + { + label = kMainQueueShort; + } + else if (strcmp(label, kChipQueue) == 0) + { + label = kChipQueueShort; + } + else if (strcmp(label, kBleQueue) == 0) + { + label = kBleQueueShort; + } + else if (strcmp(label, kXPCQueue) == 0) + { + label = kXPCQueueShort; + } + else if (strcmp(label, kDeviceQueue) == 0) + { + label = kDeviceQueueShort; + } + else if (strcmp(label, kOTAProviderQueue) == 0) + { + label = kOTAProviderQueueShort; + } + else if (strcmp(label, kDeviceAttestationQueue) == 0) + { + label = kDeviceAttestationQueueShort; + } + + return label; +} + +} // namespace queues +} // namespace darwin +} // namespace chip diff --git a/src/platform/Darwin/DispatchQueueNames.h b/src/platform/Darwin/DispatchQueueNames.h new file mode 100644 index 00000000000000..ac82608de675b4 --- /dev/null +++ b/src/platform/Darwin/DispatchQueueNames.h @@ -0,0 +1,27 @@ +/* + * 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 + +namespace chip { +namespace darwin { +namespace queues { + +const char * CurrentLabel(); + +} // namespace queues +} // namespace darwin +} // namespace chip diff --git a/src/platform/logging/impl/Stdio.cpp b/src/platform/logging/impl/Stdio.cpp index 47338de500b29d..7335190dee816c 100644 --- a/src/platform/logging/impl/Stdio.cpp +++ b/src/platform/logging/impl/Stdio.cpp @@ -24,6 +24,7 @@ #include #if defined(__APPLE__) +#include #include #include #elif defined(__gnu_linux__) @@ -65,7 +66,8 @@ void LogV(const char * module, uint8_t category, const char * msg, va_list v) #if defined(__APPLE__) uint64_t ktid; pthread_threadid_np(nullptr, &ktid); - printf("[%lld:%lld] ", static_cast(getpid()), static_cast(ktid)); + const char * label = darwin::queues::CurrentLabel(); + printf("[%lld:%lld:%s] ", static_cast(getpid()), static_cast(ktid), label); #elif defined(__gnu_linux__) && !defined(__NuttX__) // TODO: change to getpid() and gettid() after glib upgrade printf("[%lld:%lld] ", static_cast(syscall(SYS_getpid)), static_cast(syscall(SYS_gettid))); From 577074c9798796467587475e463438325c8d075b Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Tue, 10 Dec 2024 10:43:42 -0800 Subject: [PATCH 12/72] Uknown -> Unknown (#36788) * Fixing typos * Restyled by clang-format --------- Co-authored-by: Restyled.io --- src/darwin/Framework/CHIP/MTRDeviceDataValidation.mm | 2 +- .../Framework/CHIP/ServerEndpoint/MTRServerAccessControl.mm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceDataValidation.mm b/src/darwin/Framework/CHIP/MTRDeviceDataValidation.mm index cd4ebabf811b9b..838f33d093e933 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceDataValidation.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceDataValidation.mm @@ -152,7 +152,7 @@ BOOL MTREventReportIsWellFormed(NSArray * repo break; } default: - MTR_LOG_ERROR("Uknown time type for event report: %@", item); + MTR_LOG_ERROR("Unknown time type for event report: %@", item); return NO; } } diff --git a/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerAccessControl.mm b/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerAccessControl.mm index 67d546b4636e98..5f875c40d4cff8 100644 --- a/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerAccessControl.mm +++ b/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerAccessControl.mm @@ -93,7 +93,7 @@ CHIP_ERROR Check(const SubjectDescriptor & subjectDescriptor, const RequestPath } break; default: - MTR_LOG_ERROR("Uknown granted privilege %u, ignoring", grant.grantedPrivilege); + MTR_LOG_ERROR("Unknown granted privilege %u, ignoring", grant.grantedPrivilege); break; } From 9d3f2913552ba3747e04fe8022bec463570363c2 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Tue, 10 Dec 2024 11:29:30 -0800 Subject: [PATCH 13/72] [Fabric-Sync] Add --enable-icd-registration option to pair-device command (#36774) * [Fabric-Sync] Add --enable-icd-registration option to pair-device command * Restyled by clang-format --------- Co-authored-by: Restyled.io --- examples/fabric-sync/admin/PairingManager.cpp | 35 ++++++++++++++++++- examples/fabric-sync/admin/PairingManager.h | 9 ++++- .../fabric-sync/shell/AddBridgeCommand.cpp | 1 + .../fabric-sync/shell/AddDeviceCommand.cpp | 1 + .../fabric-sync/shell/PairDeviceCommand.cpp | 7 ++-- .../fabric-sync/shell/PairDeviceCommand.h | 3 +- .../fabric-sync/shell/RemoveBridgeCommand.cpp | 1 + .../fabric-sync/shell/RemoveDeviceCommand.cpp | 1 + examples/fabric-sync/shell/ShellCommands.cpp | 21 ++++++++--- .../fabric-sync/shell/SyncDeviceCommand.cpp | 1 + 10 files changed, 70 insertions(+), 10 deletions(-) diff --git a/examples/fabric-sync/admin/PairingManager.cpp b/examples/fabric-sync/admin/PairingManager.cpp index e7585ca6df0d2e..87726280eba6cf 100644 --- a/examples/fabric-sync/admin/PairingManager.cpp +++ b/examples/fabric-sync/admin/PairingManager.cpp @@ -572,8 +572,10 @@ void PairingManager::InitPairingCommand() mDeviceIsICD = false; } -CHIP_ERROR PairingManager::PairDeviceWithCode(NodeId nodeId, const char * payload) +CHIP_ERROR PairingManager::PairDeviceWithCode(NodeId nodeId, const char * payload, bool icdRegistration) { + mICDRegistration.SetValue(icdRegistration); + if (payload == nullptr || strlen(payload) > kMaxManualCodeLength + 1) { ChipLogError(NotSpecified, "PairDeviceWithCode failed: Invalid pairing payload"); @@ -663,4 +665,35 @@ CHIP_ERROR PairingManager::UnpairDevice(NodeId nodeId) }); } +void PairingManager::ResetForNextCommand() +{ + mCommissioningWindowDelegate = nullptr; + mPairingDelegate = nullptr; + mNodeId = chip::kUndefinedNodeId; + mVerifier = chip::ByteSpan(); + mSalt = chip::ByteSpan(); + mDiscriminator = 0; + mSetupPINCode = 0; + mDeviceIsICD = false; + + memset(mRandomGeneratedICDSymmetricKey, 0, sizeof(mRandomGeneratedICDSymmetricKey)); + memset(mVerifierBuffer, 0, sizeof(mVerifierBuffer)); + memset(mSaltBuffer, 0, sizeof(mSaltBuffer)); + memset(mRemoteIpAddr, 0, sizeof(mRemoteIpAddr)); + memset(mOnboardingPayload, 0, sizeof(mOnboardingPayload)); + + mICDRegistration.ClearValue(); + mICDCheckInNodeId.ClearValue(); + mICDClientType.ClearValue(); + mICDSymmetricKey.ClearValue(); + mICDMonitoredSubject.ClearValue(); + mICDStayActiveDurationMsec.ClearValue(); + + mWindowOpener.reset(); + mOnOpenCommissioningWindowCallback.Cancel(); + mOnOpenCommissioningWindowVerifierCallback.Cancel(); + mCurrentFabricRemover.reset(); + mCurrentFabricRemoveCallback.Cancel(); +} + } // namespace admin diff --git a/examples/fabric-sync/admin/PairingManager.h b/examples/fabric-sync/admin/PairingManager.h index 37e9aedec65bdb..0203d2f216ba24 100644 --- a/examples/fabric-sync/admin/PairingManager.h +++ b/examples/fabric-sync/admin/PairingManager.h @@ -106,10 +106,11 @@ class PairingManager : public chip::Controller::DevicePairingDelegate, * * @param nodeId The target node ID for pairing. * @param payload The setup code payload, which typically contains device-specific pairing information. + * @param icdRegistration The boolean value to set for mICDRegistration.* * * @return CHIP_NO_ERROR on successful initiation of the pairing process, or an appropriate CHIP_ERROR if pairing fails. */ - CHIP_ERROR PairDeviceWithCode(chip::NodeId nodeId, const char * payload); + CHIP_ERROR PairDeviceWithCode(chip::NodeId nodeId, const char * payload, bool icdRegistration = false); /** * Pairs a device using its setup PIN code and remote IP address. @@ -132,6 +133,12 @@ class PairingManager : public chip::Controller::DevicePairingDelegate, */ CHIP_ERROR UnpairDevice(chip::NodeId nodeId); + /** + * Resets the PairingManager's internal state to a baseline, making it ready to handle a new command. + * This method clears all internal states and resets all members to their initial values. + */ + void ResetForNextCommand(); + private: // Constructors PairingManager(); diff --git a/examples/fabric-sync/shell/AddBridgeCommand.cpp b/examples/fabric-sync/shell/AddBridgeCommand.cpp index eb8579c298e4f7..11dea25cb27b45 100644 --- a/examples/fabric-sync/shell/AddBridgeCommand.cpp +++ b/examples/fabric-sync/shell/AddBridgeCommand.cpp @@ -71,6 +71,7 @@ void AddBridgeCommand::OnCommissioningComplete(NodeId deviceId, CHIP_ERROR err) ChipLogValueX64(deviceId), err.Format()); } + admin::PairingManager::Instance().ResetForNextCommand(); CommandRegistry::Instance().ResetActiveCommand(); } diff --git a/examples/fabric-sync/shell/AddDeviceCommand.cpp b/examples/fabric-sync/shell/AddDeviceCommand.cpp index 47bcc226564bc6..7a78c6d23fb519 100644 --- a/examples/fabric-sync/shell/AddDeviceCommand.cpp +++ b/examples/fabric-sync/shell/AddDeviceCommand.cpp @@ -59,6 +59,7 @@ void AddDeviceCommand::OnCommissioningComplete(NodeId deviceId, CHIP_ERROR err) ChipLogValueX64(deviceId), err.Format()); } + admin::PairingManager::Instance().ResetForNextCommand(); CommandRegistry::Instance().ResetActiveCommand(); } diff --git a/examples/fabric-sync/shell/PairDeviceCommand.cpp b/examples/fabric-sync/shell/PairDeviceCommand.cpp index bc06c80dfaeec8..b7b85a4d998cf2 100644 --- a/examples/fabric-sync/shell/PairDeviceCommand.cpp +++ b/examples/fabric-sync/shell/PairDeviceCommand.cpp @@ -25,7 +25,9 @@ using namespace ::chip; namespace commands { -PairDeviceCommand::PairDeviceCommand(chip::NodeId nodeId, const char * payload) : mNodeId(nodeId), mPayload(payload) {} +PairDeviceCommand::PairDeviceCommand(chip::NodeId nodeId, const char * payload, bool enableICDRegistration) : + mNodeId(nodeId), mPayload(payload), mEnableICDRegistration(enableICDRegistration) +{} void PairDeviceCommand::OnCommissioningComplete(NodeId deviceId, CHIP_ERROR err) { @@ -57,6 +59,7 @@ void PairDeviceCommand::OnCommissioningComplete(NodeId deviceId, CHIP_ERROR err) ChipLogValueX64(deviceId), err.Format()); } + admin::PairingManager::Instance().ResetForNextCommand(); CommandRegistry::Instance().ResetActiveCommand(); } @@ -74,7 +77,7 @@ CHIP_ERROR PairDeviceCommand::RunCommand() admin::PairingManager::Instance().SetPairingDelegate(this); - return admin::PairingManager::Instance().PairDeviceWithCode(mNodeId, mPayload); + return admin::PairingManager::Instance().PairDeviceWithCode(mNodeId, mPayload, mEnableICDRegistration); } } // namespace commands diff --git a/examples/fabric-sync/shell/PairDeviceCommand.h b/examples/fabric-sync/shell/PairDeviceCommand.h index d917b5103ff597..365c6d69d256af 100644 --- a/examples/fabric-sync/shell/PairDeviceCommand.h +++ b/examples/fabric-sync/shell/PairDeviceCommand.h @@ -26,13 +26,14 @@ namespace commands { class PairDeviceCommand : public Command, public admin::PairingDelegate { public: - PairDeviceCommand(chip::NodeId nodeId, const char * payload); + PairDeviceCommand(chip::NodeId nodeId, const char * payload, bool enableICDRegistration); void OnCommissioningComplete(chip::NodeId deviceId, CHIP_ERROR err) override; CHIP_ERROR RunCommand() override; private: chip::NodeId mNodeId; const char * mPayload; + bool mEnableICDRegistration; }; } // namespace commands diff --git a/examples/fabric-sync/shell/RemoveBridgeCommand.cpp b/examples/fabric-sync/shell/RemoveBridgeCommand.cpp index 4340a3d286fade..fe933a58b707ce 100644 --- a/examples/fabric-sync/shell/RemoveBridgeCommand.cpp +++ b/examples/fabric-sync/shell/RemoveBridgeCommand.cpp @@ -46,6 +46,7 @@ void RemoveBridgeCommand::OnDeviceRemoved(NodeId deviceId, CHIP_ERROR err) ChipLogValueX64(deviceId), err.Format()); } + admin::PairingManager::Instance().ResetForNextCommand(); CommandRegistry::Instance().ResetActiveCommand(); } diff --git a/examples/fabric-sync/shell/RemoveDeviceCommand.cpp b/examples/fabric-sync/shell/RemoveDeviceCommand.cpp index 27c2f3e851e5f2..8ac27cab733390 100644 --- a/examples/fabric-sync/shell/RemoveDeviceCommand.cpp +++ b/examples/fabric-sync/shell/RemoveDeviceCommand.cpp @@ -47,6 +47,7 @@ void RemoveDeviceCommand::OnDeviceRemoved(NodeId deviceId, CHIP_ERROR err) ChipLogValueX64(deviceId), err.Format()); } + admin::PairingManager::Instance().ResetForNextCommand(); CommandRegistry::Instance().ResetActiveCommand(); } diff --git a/examples/fabric-sync/shell/ShellCommands.cpp b/examples/fabric-sync/shell/ShellCommands.cpp index f117e9c7b99274..9eb16ca0c0468e 100644 --- a/examples/fabric-sync/shell/ShellCommands.cpp +++ b/examples/fabric-sync/shell/ShellCommands.cpp @@ -47,7 +47,9 @@ static CHIP_ERROR PrintAllCommands() streamer_printf(sout, " add-device Pair a device to local fabric. Usage: app add-device node-id setup-pin-code " "device-remote-ip device-remote-port\r\n"); - streamer_printf(sout, " pair-device Pair a device to local fabric. Usage: app pair-device node-id code\r\n"); + streamer_printf( + sout, + " pair-device Pair a device to local fabric. Usage: app pair-device node-id code [--enable-icd-registration]\r\n"); streamer_printf(sout, " remove-device Remove a device from the local fabric. Usage: app remove-device node-id\r\n"); streamer_printf(sout, " sync-device Sync a device from other ecosystem. Usage: app sync-device endpointid\r\n"); streamer_printf(sout, "\r\n"); @@ -149,9 +151,11 @@ static CHIP_ERROR HandleAddDeviceCommand(int argc, char ** argv) static CHIP_ERROR HandlePairDeviceCommand(int argc, char ** argv) { - if (argc != 3) + bool enableICDRegistration = false; + + if (argc < 3 || argc > 4) // Adjusted to allow 3 or 4 arguments { - fprintf(stderr, "Invalid arguments. Usage: app pair-device node-id code\n"); + fprintf(stderr, "Invalid arguments. Usage: app pair-device node-id code [--enable-icd-registration]\n"); return CHIP_ERROR_INVALID_ARGUMENT; } @@ -162,11 +166,18 @@ static CHIP_ERROR HandlePairDeviceCommand(int argc, char ** argv) return CHIP_ERROR_BUSY; } - // Parse arguments + // Parse mandatory arguments chip::NodeId nodeId = static_cast(strtoull(argv[1], nullptr, 10)); const char * setUpCode = argv[2]; - auto command = std::make_unique(nodeId, setUpCode); + // Parse optional arguments + if (argc == 4 && strcmp(argv[3], "--enable-icd-registration") == 0) + { + enableICDRegistration = true; + } + + // Create the command object, passing the new parameter + auto command = std::make_unique(nodeId, setUpCode, enableICDRegistration); CHIP_ERROR result = command->RunCommand(); if (result == CHIP_NO_ERROR) diff --git a/examples/fabric-sync/shell/SyncDeviceCommand.cpp b/examples/fabric-sync/shell/SyncDeviceCommand.cpp index 81c822dfa6b9ee..aa9e2ce7b55e35 100644 --- a/examples/fabric-sync/shell/SyncDeviceCommand.cpp +++ b/examples/fabric-sync/shell/SyncDeviceCommand.cpp @@ -92,6 +92,7 @@ void SyncDeviceCommand::OnCommissioningComplete(NodeId deviceId, CHIP_ERROR err) ChipLogValueX64(deviceId), err.Format()); } + admin::PairingManager::Instance().ResetForNextCommand(); CommandRegistry::Instance().ResetActiveCommand(); } From c730701dded69c464677b77aecf518d1fad8bbf0 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Tue, 10 Dec 2024 11:40:36 -0800 Subject: [PATCH 14/72] Wait at least max_report_interval_sec (#36771) --- src/python_testing/TC_MCORE_FS_1_2.py | 2 +- src/python_testing/TC_MCORE_FS_1_5.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/python_testing/TC_MCORE_FS_1_2.py b/src/python_testing/TC_MCORE_FS_1_2.py index ffcbe006a3a50a..8fd9c38c2dd6cf 100644 --- a/src/python_testing/TC_MCORE_FS_1_2.py +++ b/src/python_testing/TC_MCORE_FS_1_2.py @@ -166,7 +166,7 @@ async def test_TC_MCORE_FS_1_2(self): nodeid=self.dut_node_id, attributes=subscription_contents, reportInterval=(min_report_interval_sec, max_report_interval_sec), - keepSubscriptions=False + keepSubscriptions=True ) parts_list_queue = queue.Queue() diff --git a/src/python_testing/TC_MCORE_FS_1_5.py b/src/python_testing/TC_MCORE_FS_1_5.py index bd2f40a2ead49e..2cfcd3ecbfd21e 100755 --- a/src/python_testing/TC_MCORE_FS_1_5.py +++ b/src/python_testing/TC_MCORE_FS_1_5.py @@ -173,7 +173,7 @@ async def test_TC_MCORE_FS_1_5(self): nodeid=self.dut_node_id, attributes=parts_list_subscription_contents, reportInterval=(min_report_interval_sec, max_report_interval_sec), - keepSubscriptions=False + keepSubscriptions=True ) parts_list_queue = queue.Queue() @@ -249,6 +249,7 @@ async def test_TC_MCORE_FS_1_5(self): await self.default_controller.CommissionOnNetwork(nodeId=self.th_server_local_nodeid, setupPinCode=passcode, filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, filter=discriminator) self.step(6) + max_report_interval_sec = 10 cadmin_subscription_contents = [ (newly_added_endpoint, Clusters.AdministratorCommissioning) ] @@ -256,7 +257,7 @@ async def test_TC_MCORE_FS_1_5(self): nodeid=self.dut_node_id, attributes=cadmin_subscription_contents, reportInterval=(min_report_interval_sec, max_report_interval_sec), - keepSubscriptions=False + keepSubscriptions=True ) cadmin_queue = queue.Queue() @@ -282,7 +283,7 @@ async def test_TC_MCORE_FS_1_5(self): current_fabric_index, "AdminFabricIndex is unexpected") self.step(10) - report_waiting_timeout_delay_sec = 10 + report_waiting_timeout_delay_sec = max_report_interval_sec + 1 logging.info("Waiting for update to AdministratorCommissioning attributes.") start_time = time.time() elapsed = 0 From f6163e436aa14d83db4bf0fb49d39f99edea4d9b Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Tue, 10 Dec 2024 12:17:49 -0800 Subject: [PATCH 15/72] Add fallback for unknown SHA (#36789) --- src/darwin/Framework/CHIP/MTRFrameworkDiagnostics.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/darwin/Framework/CHIP/MTRFrameworkDiagnostics.mm b/src/darwin/Framework/CHIP/MTRFrameworkDiagnostics.mm index 0cf93dc5b4daf4..3e72f0ce1123a7 100644 --- a/src/darwin/Framework/CHIP/MTRFrameworkDiagnostics.mm +++ b/src/darwin/Framework/CHIP/MTRFrameworkDiagnostics.mm @@ -18,6 +18,10 @@ #import "MTRLogging_Internal.h" +#ifndef GIT_COMMIT_SHA +#define GIT_COMMIT_SHA "unknown-sha" +#endif + void MTRFrameworkInitDiagnosticLog() { MTR_LOG("Matter Framework Init (git: %s)", GIT_COMMIT_SHA); From 918320ec5ea13484dac28dd59a214dcbd769fd4f Mon Sep 17 00:00:00 2001 From: Jeff Tung <100387939+jtung-apple@users.noreply.github.com> Date: Tue, 10 Dec 2024 12:40:17 -0800 Subject: [PATCH 16/72] [Darwin] Subscription pool logging should note associated device (#36787) --- src/darwin/Framework/CHIP/MTRDevice_Concrete.mm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm index 4eca852a692e49..1d0a113553666a 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm +++ b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm @@ -814,6 +814,7 @@ - (void)_ensureSubscriptionForExistingDelegates:(NSString *)reason if ([self _deviceUsesThread]) { MTR_LOG(" => %@ - device is a thread device, scheduling in pool", self); mtr_weakify(self); + NSString * description = [NSString stringWithFormat:@"MTRDevice setDelegate first subscription / controller resume (%p)", self]; [self _scheduleSubscriptionPoolWork:^{ mtr_strongify(self); VerifyOrReturn(self); @@ -827,7 +828,7 @@ - (void)_ensureSubscriptionForExistingDelegates:(NSString *)reason std::lock_guard lock(self->_lock); [self _clearSubscriptionPoolWork]; }]; - } inNanoseconds:0 description:@"MTRDevice setDelegate first subscription"]; + } inNanoseconds:0 description:description]; } else { [_deviceController asyncDispatchToMatterQueue:^{ std::lock_guard lock(self->_lock); @@ -1350,7 +1351,8 @@ - (void)_handleResubscriptionNeededWithDelayOnDeviceQueue:(NSNumber *)resubscrip if (deviceUsesThread) { std::lock_guard lock(_lock); // For Thread-enabled devices, schedule the _triggerResubscribeWithReason call to run in the subscription pool - [self _scheduleSubscriptionPoolWork:resubscriptionBlock inNanoseconds:resubscriptionDelayNs description:@"ReadClient resubscription"]; + NSString * description = [NSString stringWithFormat:@"ReadClient resubscription (%p)", self]; + [self _scheduleSubscriptionPoolWork:resubscriptionBlock inNanoseconds:resubscriptionDelayNs description:description]; } else { // For non-Thread-enabled devices, just call the resubscription block after the specified time dispatch_after(dispatch_time(DISPATCH_TIME_NOW, resubscriptionDelayNs), self.queue, resubscriptionBlock); @@ -1467,7 +1469,8 @@ - (void)_doHandleSubscriptionReset:(NSNumber * _Nullable)retryDelay int64_t resubscriptionDelayNs = static_cast(secondsToWait * NSEC_PER_SEC); if ([self _deviceUsesThread]) { // For Thread-enabled devices, schedule the _reattemptSubscriptionNowIfNeededWithReason call to run in the subscription pool - [self _scheduleSubscriptionPoolWork:resubscriptionBlock inNanoseconds:resubscriptionDelayNs description:@"MTRDevice resubscription"]; + NSString * description = [NSString stringWithFormat:@"MTRDevice resubscription (%p)", self]; + [self _scheduleSubscriptionPoolWork:resubscriptionBlock inNanoseconds:resubscriptionDelayNs description:description]; } else { // For non-Thread-enabled devices, just call the resubscription block after the specified time dispatch_after(dispatch_time(DISPATCH_TIME_NOW, resubscriptionDelayNs), self.queue, resubscriptionBlock); From 29c6fd85fb377da0f36b1313eeee588bed6dc2e4 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Tue, 10 Dec 2024 18:40:11 -0500 Subject: [PATCH 17/72] python testing: add test functions for IDs (#36766) * python testing: add test functions for IDs - Add functions to say whether an ID is in the standard range - simpify API to accept an int ID rather than the enum since this is how they appear on the device. - fix tests TEST: see unit test * Update src/python_testing/matter_testing_infrastructure/chip/testing/global_attribute_ids.py Co-authored-by: Andrei Litvin --------- Co-authored-by: Andrei Litvin --- src/python_testing/TC_DeviceConformance.py | 2 +- src/python_testing/TestIdChecks.py | 96 +++++++++++-------- .../chip/testing/global_attribute_ids.py | 32 ++++++- 3 files changed, 87 insertions(+), 43 deletions(-) diff --git a/src/python_testing/TC_DeviceConformance.py b/src/python_testing/TC_DeviceConformance.py index a3e350bdfb76c7..6a8c840c648265 100644 --- a/src/python_testing/TC_DeviceConformance.py +++ b/src/python_testing/TC_DeviceConformance.py @@ -295,7 +295,7 @@ def record_warning(location, problem): continue device_type_list = endpoint[Clusters.Descriptor][Clusters.Descriptor.Attributes.DeviceTypeList] - invalid_device_types = [x for x in device_type_list if not is_valid_device_type_id(device_type_id_type(x.deviceType))] + invalid_device_types = [x for x in device_type_list if not is_valid_device_type_id(x.deviceType)] standard_device_types = [x for x in endpoint[Clusters.Descriptor] [Clusters.Descriptor.Attributes.DeviceTypeList] if device_type_id_type(x.deviceType) == DeviceTypeIdType.kStandard] endpoint_clusters = [] diff --git a/src/python_testing/TestIdChecks.py b/src/python_testing/TestIdChecks.py index c86d4bfe6d0d0b..dc3422415a9af1 100644 --- a/src/python_testing/TestIdChecks.py +++ b/src/python_testing/TestIdChecks.py @@ -16,8 +16,10 @@ # 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) + cluster_id_type, command_id_type, device_type_id_type, is_standard_attribute_id, + is_standard_cluster_id, is_standard_command_id, is_standard_device_type_id, + 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 @@ -39,29 +41,33 @@ def check_standard(id): id_type = device_type_id_type(id) msg = f"Incorrect device type range assessment, expecting standard {id:08x}, type = {id_type}" asserts.assert_equal(device_type_id_type(id), DeviceTypeIdType.kStandard, msg) - asserts.assert_true(is_valid_device_type_id(id_type, allow_test=True), msg) - asserts.assert_true(is_valid_device_type_id(id_type, allow_test=False), msg) + asserts.assert_true(is_valid_device_type_id(id, allow_test=True), msg) + asserts.assert_true(is_valid_device_type_id(id, allow_test=False), msg) + asserts.assert_true(is_standard_device_type_id(id), msg) def check_manufacturer(id): id_type = device_type_id_type(id) msg = f"Incorrect device type range assessment, expecting manufacturer {id:08x}, type = {id_type}" asserts.assert_equal(device_type_id_type(id), DeviceTypeIdType.kManufacturer, msg) - asserts.assert_true(is_valid_device_type_id(id_type, allow_test=True), msg) - asserts.assert_true(is_valid_device_type_id(id_type, allow_test=False), msg) + asserts.assert_true(is_valid_device_type_id(id, allow_test=True), msg) + asserts.assert_true(is_valid_device_type_id(id, allow_test=False), msg) + asserts.assert_false(is_standard_device_type_id(id), msg) def check_test(id): id_type = device_type_id_type(id) msg = f"Incorrect device type range assessment, expecting test {id:08x}, type = {id_type}" asserts.assert_equal(device_type_id_type(id), DeviceTypeIdType.kTest, msg) - asserts.assert_true(is_valid_device_type_id(id_type, allow_test=True), msg) - asserts.assert_false(is_valid_device_type_id(id_type, allow_test=False), msg) + asserts.assert_true(is_valid_device_type_id(id, allow_test=True), msg) + asserts.assert_false(is_valid_device_type_id(id, allow_test=False), msg) + asserts.assert_false(is_standard_device_type_id(id), msg) def check_all_bad(id): id_type = device_type_id_type(id) msg = f"Incorrect device type range assessment, expecting invalid {id:08x}, type = {id_type}" asserts.assert_equal(device_type_id_type(id), DeviceTypeIdType.kInvalid, msg) - asserts.assert_false(is_valid_device_type_id(id_type, allow_test=True), msg) - asserts.assert_false(is_valid_device_type_id(id_type, allow_test=False), msg) + asserts.assert_false(is_valid_device_type_id(id, allow_test=True), msg) + asserts.assert_false(is_valid_device_type_id(id, allow_test=False), msg) + asserts.assert_false(is_standard_device_type_id(id), msg) for id in standard_good: check_standard(id) @@ -100,29 +106,33 @@ def check_standard(id): id_type = cluster_id_type(id) msg = f"Incorrect cluster range assessment, expecting standard {id:08x}, type = {id_type}" asserts.assert_equal(id_type, ClusterIdType.kStandard, msg) - asserts.assert_true(is_valid_cluster_id(id_type, allow_test=True), msg) - asserts.assert_true(is_valid_cluster_id(id_type, allow_test=False), msg) + asserts.assert_true(is_valid_cluster_id(id, allow_test=True), msg) + asserts.assert_true(is_valid_cluster_id(id, allow_test=False), msg) + asserts.assert_true(is_standard_cluster_id(id), msg) def check_manufacturer(id): id_type = cluster_id_type(id) msg = f"Incorrect cluster range assessment, expecting manufacturer {id:08x}, type = {id_type}" asserts.assert_equal(id_type, ClusterIdType.kManufacturer, msg) - asserts.assert_true(is_valid_cluster_id(id_type, allow_test=True), msg) - asserts.assert_true(is_valid_cluster_id(id_type, allow_test=False), msg) + asserts.assert_true(is_valid_cluster_id(id, allow_test=True), msg) + asserts.assert_true(is_valid_cluster_id(id, allow_test=False), msg) + asserts.assert_false(is_standard_cluster_id(id), msg) def check_test(id): id_type = cluster_id_type(id) msg = f"Incorrect cluster range assessment, expecting test {id:08x}, type = {id_type}" asserts.assert_equal(id_type, ClusterIdType.kTest, msg) - asserts.assert_true(is_valid_cluster_id(id_type, allow_test=True), msg) - asserts.assert_false(is_valid_cluster_id(id_type, allow_test=False), msg) + asserts.assert_true(is_valid_cluster_id(id, allow_test=True), msg) + asserts.assert_false(is_valid_cluster_id(id, allow_test=False), msg) + asserts.assert_false(is_standard_cluster_id(id), msg) def check_all_bad(id): id_type = cluster_id_type(id) msg = f"Incorrect cluster range assessment, expecting invalid {id:08x}, type = {id_type}" asserts.assert_equal(id_type, ClusterIdType.kInvalid, msg) - asserts.assert_false(is_valid_cluster_id(id_type, allow_test=True), msg) - asserts.assert_false(is_valid_cluster_id(id_type, allow_test=False), msg) + asserts.assert_false(is_valid_cluster_id(id, allow_test=True), msg) + asserts.assert_false(is_valid_cluster_id(id, allow_test=False), msg) + asserts.assert_false(is_standard_cluster_id(id), msg) for id in standard_good: check_standard(id) @@ -160,36 +170,41 @@ def check_standard_global(id): id_type = attribute_id_type(id) msg = f"Incorrect attribute range assessment, expecting standard global {id:08x}, type = {id_type}" asserts.assert_equal(id_type, AttributeIdType.kStandardGlobal, msg) - asserts.assert_true(is_valid_attribute_id(id_type, allow_test=True), msg) - asserts.assert_true(is_valid_attribute_id(id_type, allow_test=False), msg) + asserts.assert_true(is_valid_attribute_id(id, allow_test=True), msg) + asserts.assert_true(is_valid_attribute_id(id, allow_test=False), msg) + asserts.assert_true(is_standard_attribute_id(id), msg) def check_standard_non_global(id): id_type = attribute_id_type(id) msg = f"Incorrect attribute range assessment, expecting standard non-global {id:08x}, type = {id_type}" asserts.assert_equal(id_type, AttributeIdType.kStandardNonGlobal, msg) - asserts.assert_true(is_valid_attribute_id(id_type, allow_test=True), msg) - asserts.assert_true(is_valid_attribute_id(id_type, allow_test=False), msg) + asserts.assert_true(is_valid_attribute_id(id, allow_test=True), msg) + asserts.assert_true(is_valid_attribute_id(id, allow_test=False), msg) + asserts.assert_true(is_standard_attribute_id(id), msg) def check_manufacturer(id): id_type = attribute_id_type(id) msg = f"Incorrect attribute range assessment, expecting manufacturer {id:08x}, type = {id_type}" asserts.assert_equal(id_type, AttributeIdType.kManufacturer, msg) - asserts.assert_true(is_valid_attribute_id(id_type, allow_test=True), msg) - asserts.assert_true(is_valid_attribute_id(id_type, allow_test=False), msg) + asserts.assert_true(is_valid_attribute_id(id, allow_test=True), msg) + asserts.assert_true(is_valid_attribute_id(id, allow_test=False), msg) + asserts.assert_false(is_standard_attribute_id(id), msg) def check_test(id): id_type = attribute_id_type(id) msg = f"Incorrect attribute range assessment, expecting test {id:08x}, type = {id_type}" asserts.assert_equal(id_type, AttributeIdType.kTest, msg) - asserts.assert_true(is_valid_attribute_id(id_type, allow_test=True), msg) - asserts.assert_false(is_valid_attribute_id(id_type, allow_test=False), msg) + asserts.assert_true(is_valid_attribute_id(id, allow_test=True), msg) + asserts.assert_false(is_valid_attribute_id(id, allow_test=False), msg) + asserts.assert_false(is_standard_attribute_id(id), msg) def check_all_bad(id): id_type = attribute_id_type(id) msg = f"Incorrect attribute range assessment, expecting invalid {id:08x}, type = {id_type}" asserts.assert_equal(id_type, AttributeIdType.kInvalid, msg) - asserts.assert_false(is_valid_attribute_id(id_type, allow_test=True), msg) - asserts.assert_false(is_valid_attribute_id(id_type, allow_test=False), msg) + asserts.assert_false(is_valid_attribute_id(id, allow_test=True), msg) + asserts.assert_false(is_valid_attribute_id(id, allow_test=False), msg) + asserts.assert_false(is_standard_attribute_id(id), msg) for id in standard_global_good: check_standard_global(id) @@ -225,36 +240,41 @@ 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) + asserts.assert_true(is_valid_command_id(id, allow_test=True), msg) + asserts.assert_true(is_valid_command_id(id, allow_test=False), msg) + asserts.assert_true(is_standard_command_id(id), 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) + asserts.assert_true(is_valid_command_id(id, allow_test=True), msg) + asserts.assert_true(is_valid_command_id(id, allow_test=False), msg) + asserts.assert_true(is_standard_command_id(id), 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) + asserts.assert_true(is_valid_command_id(id, allow_test=True), msg) + asserts.assert_true(is_valid_command_id(id, allow_test=False), msg) + asserts.assert_false(is_standard_command_id(id), 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) + asserts.assert_true(is_valid_command_id(id, allow_test=True), msg) + asserts.assert_false(is_valid_command_id(id, allow_test=False), msg) + asserts.assert_false(is_standard_command_id(id), 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) + asserts.assert_false(is_valid_command_id(id, allow_test=True), msg) + asserts.assert_false(is_valid_command_id(id, allow_test=False), msg) + asserts.assert_false(is_standard_command_id(id), msg) for id in standard_global_good: check_standard_global(id) diff --git a/src/python_testing/matter_testing_infrastructure/chip/testing/global_attribute_ids.py b/src/python_testing/matter_testing_infrastructure/chip/testing/global_attribute_ids.py index f9fbd2e2ade835..b9ca999db330f8 100644 --- a/src/python_testing/matter_testing_infrastructure/chip/testing/global_attribute_ids.py +++ b/src/python_testing/matter_testing_infrastructure/chip/testing/global_attribute_ids.py @@ -116,7 +116,13 @@ def device_type_id_type(id: int) -> DeviceTypeIdType: return DeviceTypeIdType.kInvalid -def is_valid_device_type_id(id_type: DeviceTypeIdType, allow_test=False) -> bool: +def is_standard_device_type_id(id: int) -> bool: + id_type = device_type_id_type(id) + return id_type == DeviceTypeIdType.kStandard + + +def is_valid_device_type_id(id: int, allow_test=False) -> bool: + id_type = device_type_id_type(id) valid = [DeviceTypeIdType.kStandard, DeviceTypeIdType.kManufacturer] if allow_test: valid.append(DeviceTypeIdType.kTest) @@ -133,7 +139,13 @@ def cluster_id_type(id: int) -> ClusterIdType: return ClusterIdType.kInvalid -def is_valid_cluster_id(id_type: ClusterIdType, allow_test: bool = False) -> bool: +def is_standard_cluster_id(id: int) -> bool: + id_type = cluster_id_type(id) + return id_type == ClusterIdType.kStandard + + +def is_valid_cluster_id(id: int, allow_test: bool = False) -> bool: + id_type = cluster_id_type(id) valid = [ClusterIdType.kStandard, ClusterIdType.kManufacturer] if allow_test: valid.append(ClusterIdType.kTest) @@ -152,13 +164,19 @@ def attribute_id_type(id: int) -> AttributeIdType: return AttributeIdType.kInvalid -def is_valid_attribute_id(id_type: AttributeIdType, allow_test: bool = False): +def is_valid_attribute_id(id: int, allow_test: bool = False): + id_type = attribute_id_type(id) valid = [AttributeIdType.kStandardGlobal, AttributeIdType.kStandardNonGlobal, AttributeIdType.kManufacturer] if allow_test: valid.append(AttributeIdType.kTest) return id_type in valid +def is_standard_attribute_id(id: int): + id_type = attribute_id_type(id) + return id_type in [AttributeIdType.kStandardGlobal, AttributeIdType.kStandardNonGlobal] + + def command_id_type(id: int) -> CommandIdType: if id in STANDARD_PREFIX and id in COMMAND_ID_GLOBAL_STANDARD_SUFFIX: return CommandIdType.kStandardGlobal @@ -171,7 +189,13 @@ def command_id_type(id: int) -> CommandIdType: return CommandIdType.kInvalid -def is_valid_command_id(id_type: CommandIdType, allow_test: bool = False): +def is_standard_command_id(id: int): + id_type = command_id_type(id) + return id_type in [CommandIdType.kScopedNonGlobal, CommandIdType.kStandardGlobal] + + +def is_valid_command_id(id: int, allow_test: bool = False): + id_type = command_id_type(id) valid = [CommandIdType.kStandardGlobal, CommandIdType.kScopedNonGlobal, CommandIdType.kManufacturer] if allow_test: valid.append(CommandIdType.kTest) From 2c11741dedbe26485ff3355aca8b1a23d5bd30e3 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Tue, 10 Dec 2024 22:13:50 -0800 Subject: [PATCH 18/72] Protect against invalid enums being returned (#36792) * Adding type protection here * Restyled by clang-format * Safer way to do this * Restyled by clang-format * Fixing format * Restyled by clang-format * Adding error * Restyled by clang-format --------- Co-authored-by: Restyled.io --- src/darwin/Framework/CHIP/MTRDevice_XPC.mm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/darwin/Framework/CHIP/MTRDevice_XPC.mm b/src/darwin/Framework/CHIP/MTRDevice_XPC.mm index d5356320b24d4c..bc5fa52b327236 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_XPC.mm +++ b/src/darwin/Framework/CHIP/MTRDevice_XPC.mm @@ -322,7 +322,20 @@ - (oneway void)device:(NSNumber *)nodeID internalStateUpdated:(NSDictionary *)di - (MTRDeviceState)state { NSNumber * stateNumber = MTR_SAFE_CAST(self._internalState[kMTRDeviceInternalPropertyDeviceState], NSNumber); - return stateNumber ? static_cast(stateNumber.unsignedIntegerValue) : MTRDeviceStateUnknown; + switch (static_cast(stateNumber.unsignedIntegerValue)) { + case MTRDeviceStateUnknown: + return MTRDeviceStateUnknown; + + case MTRDeviceStateUnreachable: + return MTRDeviceStateUnreachable; + + case MTRDeviceStateReachable: + return MTRDeviceStateReachable; + } + + MTR_LOG_ERROR("stateNumber from internal state is an invalid value: %@", stateNumber); + + return MTRDeviceStateUnknown; } - (BOOL)deviceCachePrimed From 6d9d37897feeb72a6bce898c1dccd6bb2e901763 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Wed, 11 Dec 2024 19:00:56 +0530 Subject: [PATCH 19/72] docs: add the table of content to the chip-tool guide (#36797) --- .../chip-tool/chip_tool_guide.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/development_controllers/chip-tool/chip_tool_guide.md b/docs/development_controllers/chip-tool/chip_tool_guide.md index 81000368a47f0c..85b62dbc9dac74 100644 --- a/docs/development_controllers/chip-tool/chip_tool_guide.md +++ b/docs/development_controllers/chip-tool/chip_tool_guide.md @@ -9,6 +9,26 @@ the setup payload or performing discovery actions.
+## Table of Contents + +- [Installation](#installation) +- [Building from source](#building-from-source) +- [Running the CHIP Tool](#running-the-chip-tool) +- [CHIP Tool modes](#chip-tool-modes) + - [Single-command mode (default)](#single-command-mode-default) + - [Interactive mode](#interactive-mode) +- [Using CHIP Tool for Matter device testing](#using-chip-tool-for-matter-device-testing) +- [Supported commands and options](#supported-commands-and-options) + - [List all supported clusters](#printing-all-supported-clusters) + - [List all supported command for a cluster](#getting-the-list-of-commands-supported-for-a-specific-cluster) + - [List all supported attributes for a cluster](#getting-the-list-of-attributes-supported-for-a-specific-cluster) + - [Command options](#getting-the-list-of-command-options) +- [Testing and Interaction](#running-a-test-suite-against-a-paired-peer-device) +- [Multi-admin scenario](#multi-admin-scenario) +- [Subscribing to events or attributes](#subscribing-to-events-or-attributes) +- [Using wildcards](#using-wildcards) +- [Saving users and credentials for door lock device](#saving-users-and-credentials-on-door-lock-devices) + ## Installation On Linux distributions From c799e5c40e7aa52509d3a855f1e17e20b34fabdf Mon Sep 17 00:00:00 2001 From: feasel <120589145+feasel0@users.noreply.github.com> Date: Wed, 11 Dec 2024 08:31:36 -0500 Subject: [PATCH 20/72] Adding string builder adapters for Milliseconds64 and Microseconds64 (#36794) * Added string builder adaptesr for chip::System::Clock::Microseconds64 and Milliseconds64 * Restyled by clang-format * Cast the time to llu because some platforms use lu. * Added exception for chrono to check_includes_config.py --------- Co-authored-by: Restyled.io --- scripts/tools/check_includes_config.py | 1 + src/lib/core/StringBuilderAdapters.cpp | 27 ++++++++++++++++++++++++++ src/lib/core/StringBuilderAdapters.h | 15 ++++++++++++++ 3 files changed, 43 insertions(+) diff --git a/scripts/tools/check_includes_config.py b/scripts/tools/check_includes_config.py index 2e79c6f8f9cfa9..a7da891ea59c12 100644 --- a/scripts/tools/check_includes_config.py +++ b/scripts/tools/check_includes_config.py @@ -119,6 +119,7 @@ # Only uses for zero-cost types. 'src/system/SystemClock.h': {'chrono'}, 'src/platform/mbed/MbedEventTimeout.h': {'chrono'}, + 'src/lib/core/StringBuilderAdapters.h': {'chrono'}, 'src/app/app-platform/ContentApp.h': {'list', 'string'}, 'src/app/app-platform/ContentAppPlatform.cpp': {'string'}, diff --git a/src/lib/core/StringBuilderAdapters.cpp b/src/lib/core/StringBuilderAdapters.cpp index be07ae92cf7923..7ed0774f10a2f2 100644 --- a/src/lib/core/StringBuilderAdapters.cpp +++ b/src/lib/core/StringBuilderAdapters.cpp @@ -28,6 +28,22 @@ StatusWithSize ToString(const CHIP_ERROR & err, pw::span buffe return pw::string::Format(buffer, "CHIP_ERROR:<%" CHIP_ERROR_FORMAT ">", err.Format()); } +template <> +StatusWithSize ToString>(const std::chrono::duration & time, + pw::span buffer) +{ + // Cast to llu because some platforms use lu and others use llu. + return pw::string::Format(buffer, "%llums", static_cast(time.count())); +} + +template <> +StatusWithSize ToString>(const std::chrono::duration & time, + pw::span buffer) +{ + // Cast to llu because some platforms use lu and others use llu. + return pw::string::Format(buffer, "%lluus", static_cast(time.count())); +} + } // namespace pw #if CHIP_CONFIG_TEST_GOOGLETEST @@ -42,5 +58,16 @@ void PrintTo(const CHIP_ERROR & err, std::ostream * os) } *os << "CHIP_ERROR:<" << err.Format() << ">"; } + +void PrintTo(const std::chrono::duration & time, std::ostream * os) +{ + *os << time.count() << "ms"; +} + +void PrintTo(const std::chrono::duration & time, std::ostream * os) +{ + *os << time.count() << "us"; +} + } // namespace chip #endif // CHIP_CONFIG_TEST_GOOGLETEST diff --git a/src/lib/core/StringBuilderAdapters.h b/src/lib/core/StringBuilderAdapters.h index ad3bfb71e2299a..b49fa229b46586 100644 --- a/src/lib/core/StringBuilderAdapters.h +++ b/src/lib/core/StringBuilderAdapters.h @@ -41,6 +41,8 @@ /// Expected: .... == CHIP_ERROR(0, "src/setup_payload/tests/TestAdditionalDataPayload.cpp", 234) /// Actual: CHIP_ERROR: == CHIP_NO_ERROR +#include + #include #include @@ -51,6 +53,14 @@ namespace pw { template <> StatusWithSize ToString(const CHIP_ERROR & err, pw::span buffer); +// Adapters for chip::System::Clock::Microseconds64 and Milliseconds64 +template <> +StatusWithSize ToString>(const std::chrono::duration & time, + pw::span buffer); +template <> +StatusWithSize ToString>(const std::chrono::duration & time, + pw::span buffer); + } // namespace pw #if CHIP_CONFIG_TEST_GOOGLETEST @@ -69,5 +79,10 @@ namespace chip { /// /// This enhances the readability and diagnostic information in GoogleTest test logs. void PrintTo(const CHIP_ERROR & err, std::ostream * os); + +// Adapters for chip::System::Clock::Microseconds64 and Milliseconds64 +void PrintTo(const std::chrono::duration & time, std::ostream * os); +void PrintTo(const std::chrono::duration & time, std::ostream * os); + } // namespace chip #endif // CHIP_CONFIG_TEST_GOOGLETEST From 817b60b6756195c17f1d9e29fb00eee018095704 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Wed, 11 Dec 2024 15:19:18 +0100 Subject: [PATCH 21/72] [chip-tool] Allow optional arguments to be used as flags without requiring a value (#36786) --- .../chip-tool/commands/common/Command.cpp | 64 +++++++++++++++++-- 1 file changed, 57 insertions(+), 7 deletions(-) diff --git a/examples/chip-tool/commands/common/Command.cpp b/examples/chip-tool/commands/common/Command.cpp index 91a65db789d976..db5864550a7f1c 100644 --- a/examples/chip-tool/commands/common/Command.cpp +++ b/examples/chip-tool/commands/common/Command.cpp @@ -41,6 +41,7 @@ constexpr char kOptionalArgumentPrefix[] = "--"; constexpr size_t kOptionalArgumentPrefixLength = 2; +char kOptionalArgumentNullableDefault[] = "null"; bool Command::InitArguments(int argc, char ** argv) { @@ -81,10 +82,33 @@ bool Command::InitArguments(int argc, char ** argv) } // Initialize optional arguments - // Optional arguments expect a name and a value, so i is increased by 2 on every step. - for (size_t i = mandatoryArgsCount; i < (size_t) argc; i += 2) + // + // The optional arguments have a specific format and can also be "nullable": + // - Each optional argument is prefixed by `kOptionalArgumentPrefix` (e.g., "--"). + // - Every optional argument name should be immediately followed by its corresponding value, unless it is nullable. + // - For nullable optional arguments, it is valid to have no subsequent value. In that case, the argument is set to a + // default null value. This allows such arguments to act as flags: + // - If the next token in `argv` starts with the optional prefix, or if this argument is the last one, + // we treat the optional argument as null (no specified value). + // + // The loop processes arguments starting at `mandatoryArgsCount` because all mandatory arguments are already processed. + // We iterate through `argv` and attempt to match each potential optional argument. The logic is as follows: + // 1. Check if the current argument (`argv[i]`) is indeed an optional argument by verifying it has the prefix + // `kOptionalArgumentPrefix`. + // 2. If it matches a known optional argument name, handle its value: + // - If the optional argument is nullable and the following conditions hold: + // a) There are no more arguments (`i + 1 >= argc`), or + // b) The next argument (`argv[i + 1]`) is also an optional argument (prefix check) + // then set the current optional argument to a null default. + // - Otherwise, expect the next argument (`argv[i + 1]`) to be the value. If no value is provided, log an error and exit. + // 3. Once processed, move the index `i` forward by 2 if a value was consumed (name + value), or by 1 if the argument was + // nullable and no value was consumed. + // + // If at any point an argument cannot be matched or initialized properly, an error is logged and we exit. + for (size_t i = mandatoryArgsCount; i < (size_t) argc;) { - bool found = false; + bool found = false; + bool foundValue = false; for (size_t j = mandatoryArgsCount; j < mandatoryArgsCount + optionalArgsCount; j++) { // optional arguments starts with kOptionalArgumentPrefix @@ -98,14 +122,40 @@ bool Command::InitArguments(int argc, char ** argv) { found = true; - VerifyOrExit((size_t) argc > (i + 1), - ChipLogError(chipTool, "InitArgs: Optional argument %s missing value.", argv[i])); - if (!InitArgument(j, argv[i + 1])) + if (mArgs[j].isNullable()) { - ExitNow(); + if ((size_t) argc <= (i + 1)) + { + // This is the last argument, so set it to null. + VerifyOrDo(InitArgument(j, kOptionalArgumentNullableDefault), ExitNow()); + continue; + } + + if (strncmp(argv[i + 1], kOptionalArgumentPrefix, kOptionalArgumentPrefixLength) == 0) + { + // The argument is followed by an other optional argument, so set it to null. + VerifyOrDo(InitArgument(j, kOptionalArgumentNullableDefault), ExitNow()); + continue; + } } + + VerifyOrExit((size_t) argc > (i + 1), + ChipLogError(chipTool, "InitArgs: Optional argument %s missing value.", argv[i])); + + foundValue = true; + VerifyOrDo(InitArgument(j, argv[i + 1]), ExitNow()); } } + + if (foundValue) + { + i += 2; + } + else + { + i += 1; + } + VerifyOrExit(found, ChipLogError(chipTool, "InitArgs: Optional argument %s does not exist.", argv[i])); } From fa65a3e30324e1aced2ef3c018ceaab768bdb62c Mon Sep 17 00:00:00 2001 From: dinabenamar <108664279+dinabenamar@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:23:03 +0100 Subject: [PATCH 22/72] [NXP][platform][common] Add flexibility to override "CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART" with generated configuration (#36778) Signed-off-by: Dina Benamar --- .../nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h b/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h index 5d8825bc8a6e6d..5e5fd2b14d5fea 100644 --- a/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h +++ b/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h @@ -45,6 +45,13 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE CONFIG_CHIP_DEVICE_USE_TEST_PAIRING_CODE #define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER CONFIG_CHIP_DEVICE_SERIAL_NUMBER #endif // CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA + +#ifdef CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART +#define CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART +#else +#define CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART 0 +#endif + #endif // CONFIG_CHIP_USE_GENERATED_CONFIG #ifndef CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION From 425e5bdd1a29b777815cb561103c61a49514c406 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 11 Dec 2024 09:38:45 -0500 Subject: [PATCH 23/72] python testing: Allow top-level PICS with automated selectors (#36727) When this was originally written the idea was that the TH would run these tests unconditionally and the test itself would indicate if it ran. This works well in the CI and we still want to maintain this mechanism since it will allow us to automate test selection more easily down the road. However, the time required to even start a test in the TH is significant. With the way the test harness is set up currently, adding unconditional tests adds a significant amount of time to testing, even if the tests don't run. For now, let's bring back at least cluster-level gating. We can still gate internally on cluster elements for the CI. This isn't ideal, but it's where we are now. --- .../chip/testing/matter_testing.py | 2 -- .../test_testing/TestDecorators.py | 16 ---------------- 2 files changed, 18 deletions(-) diff --git a/src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py b/src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py index c8a819261ffb0b..3b3fb6270b613c 100644 --- a/src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py +++ b/src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py @@ -2216,8 +2216,6 @@ def run_if_endpoint_matches(accept_function: EndpointCheckFunction): """ def run_if_endpoint_matches_internal(body): def per_endpoint_runner(self: MatterBaseTest, *args, **kwargs): - asserts.assert_false(self.get_test_pics(self.current_test_info.name), - "pics_ method supplied for run_if_endpoint_matches.") runner_with_timeout = asyncio.wait_for(should_run_test_on_endpoint(self, accept_function), timeout=60) should_run_test = asyncio.run(runner_with_timeout) if not should_run_test: diff --git a/src/python_testing/test_testing/TestDecorators.py b/src/python_testing/test_testing/TestDecorators.py index c4851eaee56c35..4d4b268ee91dfa 100644 --- a/src/python_testing/test_testing/TestDecorators.py +++ b/src/python_testing/test_testing/TestDecorators.py @@ -145,16 +145,6 @@ async def test_endpoints(self): should_run = await should_run_test_on_endpoint(self, has_timesync_utc) asserts.assert_false(should_run, msg) - # This test should cause an assertion because it has a pics_ method - @run_if_endpoint_matches(has_cluster(Clusters.OnOff)) - async def test_endpoint_with_pics(self): - pass - - # This method returns the top level pics for test_endpoint_with_pics - # It is used to test that test_endpoint_with_pics will fail since you can't have a per endpoint test gated on a PICS. - def pics_endpoint_with_pics(self): - return ['EXAMPLE.S'] - # This test should be run once per endpoint @run_if_endpoint_matches(has_cluster(Clusters.OnOff)) async def test_endpoint_cluster_yes(self): @@ -243,12 +233,6 @@ def main(): if not ok: failures.append("Test case failure: test_endpoints") - test_name = 'test_endpoint_with_pics' - test_runner.set_test('TestDecorators.py', 'TestDecorators', test_name) - ok = test_runner.run_test_with_mock_read(read_resp, hooks) - if ok: - failures.append(f"Did not get expected test assertion on {test_name}") - # Test should run once for the whole node, regardless of the number of endpoints def run_check(test_name: str, read_response: Attribute.AsyncReadTransaction.ReadResponse, expect_skip: bool) -> None: nonlocal failures From 9c8a5525bbc4dd69818227e0ba7cde28f6e01d14 Mon Sep 17 00:00:00 2001 From: Sergio Soares Date: Wed, 11 Dec 2024 10:07:54 -0500 Subject: [PATCH 24/72] Fix missing include in platform/Linux/DeviceInstanceInfoProviderImpl.cpp (#36790) --- src/platform/Linux/DeviceInstanceInfoProviderImpl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform/Linux/DeviceInstanceInfoProviderImpl.cpp b/src/platform/Linux/DeviceInstanceInfoProviderImpl.cpp index 5cf7f49b64d29a..8b2ee36c27ddb1 100644 --- a/src/platform/Linux/DeviceInstanceInfoProviderImpl.cpp +++ b/src/platform/Linux/DeviceInstanceInfoProviderImpl.cpp @@ -19,6 +19,7 @@ #include "DeviceInstanceInfoProviderImpl.h" #include +#include namespace chip { namespace DeviceLayer { From e4a0402f7320a3c39e6bfce237b087b30faa57a9 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 11 Dec 2024 11:53:18 -0500 Subject: [PATCH 25/72] Expose various APIs in Matter.framework. (#36793) This exposes the following: * Dishwasher Alarm cluster. * Dishwasher Mode cluster, except the OnOff feature bit and the StartUpMode and OnMode attributes, which are marked X in the specification, and the generic mode tags, which might not end up being part of the cluster in the long term. * Door Lock cluster unbolt/unlatch bits. * ICD Management cluster (note: the deprecated Key field in MonitoringRegistrationStruct is not present in the SDK XML, so there is no need to explicitly exclude it). * Laundry Washer Controls cluster. * Laundry Washer Mode cluster, except the OnOff feature bit and the StartUpMode and OnMode attributes, which are marked X in the specification, and the generic mode tags, which might not end up being part of the cluster in the long term. * Microwave Oven Control cluster. * Microwave Oven Mode cluster, except the OnOff feature bit, which are marked X in the specification, and the generic mode tags, which might not end up being part of the cluster in the long term. * Oven Mode cluster, except the OnOff feature bit and the StartUpMode and OnMode attributes, which are marked X in the specification, and the generic mode tags, which might not end up being part of the cluster in the long term. * Oven Cavity Operational State cluster, except the Pause and Resume commands, which are marked X in the specification, and the enums which are not actually part of the cluster in the spec. * Refrigerator And Temperature Controlled Cabinet Mode cluster, except the OnOff feature bit and the StartUpMode and OnMode attributes, which are marked X in the specification, and the generic mode tags, which might not end up being part of the cluster in the long term. * Refrigerator Alarm cluster. * RVC Operational State cluster GoHome command. * RVC Run Mode cluster Mapping mode tag. * Temperature Control cluster. And removes the following stale provisional annotations, because the corresponding items have been removed from the XML: * RVC Clean Mode's OnMode attribute and OnOff feature bit. * RVC Run Mode's OnMode attribute and OnOff feature bit. * RVC Operational State's Start/Stop commands. * EventList attribute. * Barrier Control cluster bits. * General Diagnostics' AverageWearCount attribute. --- .../CHIP/templates/availability.yaml | 714 +++++- .../MTRAttributeSpecifiedCheck.mm | 24 - .../MTRAttributeTLVValueDecoder.mm | 120 - .../CHIP/zap-generated/MTRBaseClusters.h | 1020 ++++----- .../CHIP/zap-generated/MTRBaseClusters.mm | 694 +----- .../CHIP/zap-generated/MTRClusterConstants.h | 308 ++- .../CHIP/zap-generated/MTRClusterNames.mm | 40 - .../CHIP/zap-generated/MTRClusters.h | 358 ++- .../CHIP/zap-generated/MTRClusters.mm | 190 -- .../zap-generated/MTRCommandPayloadsObjc.h | 182 +- .../zap-generated/MTRCommandPayloadsObjc.mm | 146 -- .../MTRCommandPayloads_Internal.h | 12 - .../CHIP/zap-generated/MTRStructsObjc.h | 126 +- .../zap-generated/cluster/Commands.h | 1941 ----------------- 14 files changed, 1566 insertions(+), 4309 deletions(-) diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 60fe08f618c2d5..0b43860b3d4696 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -7469,44 +7469,13 @@ - Wpa3Personal provisional: clusters: - ## Not ready at cutoff - - RefrigeratorAlarm - - TemperatureControl ## Not ready to be public API yet. - - ICDManagement - - LaundryWasherMode - - RefrigeratorAndTemperatureControlledCabinetMode - - DishwasherMode - - LaundryWasherControls - - DishwasherAlarm - SampleMEI attributes: Scenes: # New scenes bits not stable yet. - SceneTableSize - RVCCleanMode: - # People are trying to deprecate this one - - OnMode - RVCRunMode: - # People are trying to deprecate this one - - OnMode - commands: - DoorLock: - # Not stable yet - - UnboltDoor - RVCOperationalState: - # Disallowed in the spec, but present in our XML? - - Start - - Stop enum values: - DoorLock: - # Not stable yet - DlLockState: - - Unlatched - DlLockType: - - Eurocylinder - LockOperationTypeEnum: - - Unlatch TimeSynchronization: TimeSourceEnum: - NonMatterSNTP @@ -7521,25 +7490,7 @@ - MixedNTPNTS - PTP - GNSS - bitmap values: - DoorLock: - # Not stable yet - # Feature was originally named DoorLockFeature, but we generate the - # same API for both of those names, so the name can just change - # here. - Feature: - - Unbolt - RVCRunMode: - Feature: - # People are trying to deprecate this one - - OnOff - RVCCleanMode: - Feature: - # People are trying to deprecate this one - - OnOff - global attributes: - - EventList - # Once we actually unmark TimeSynchronization as provisional, all these bits except EventList should go away too, and we should instead + # Once we actually unmark TimeSynchronization as provisional, all these bits should go away too, and we should instead # mark things as introduced/deprecated as needed. The "ids" entries should go away, in particular. ids: attributes: @@ -7547,15 +7498,6 @@ - TimeZoneListMaxSize - DSTOffsetListMaxSize - SupportsDNSResolve - # Because we are special-casing ids for TimeSynchronization - # above, we need to explicitly mark the EventList id - # provisional. - - EventList - PulseWidthModulation: - # Because we are special-casing ids for PulseWidthModulation - # above, we need to explicitly mark the EventList id - # provisional. - - EventList commands: TimeSynchronization: - SetUTCTime @@ -7592,14 +7534,18 @@ provisional: attributes: Descriptor: + # New things, not quite finalized. The XML does not match the spec: + # in the spec SemanticTagStruct is not a cluster-specific type. - TagList structs: - # New things, not quite finalized. Descriptor: + # New things, not quite finalized. The XML does not match the spec: + # in the spec SemanticTagStruct is not a cluster-specific type. - SemanticTagStruct struct fields: - # New things, not quite finalized. Descriptor: + # New things, not quite finalized. The XML does not match the spec: + # in the spec SemanticTagStruct is not a cluster-specific type. SemanticTagStruct: - mfgCode - namespaceID @@ -7609,12 +7555,14 @@ # CacheAndSync is provisional in the spec. GroupKeyManagement: - Feature - # New things, not quite finalized. Descriptor: + # New things, not quite finalized. The XML does not match the spec: + # in the spec SemanticTagStruct is not a cluster-specific type. - Feature bitmap values: - # New things, not quite finalized. Descriptor: + # New things, not quite finalized. The XML does not match the spec: + # in the spec SemanticTagStruct is not a cluster-specific type. Feature: - TagList # CacheAndSync is provisional in the spec. @@ -7744,18 +7692,10 @@ - DeadFront provisional: bitmaps: - BarrierControl: - - BarrierControlCapabilities - - BarrierControlSafetyStatus BallastConfiguration: # The BallastConfiguration cluster is provisional for now, but not marked that way. - BallastStatusBitmap - LampAlarmModeBitmap - attributes: - GeneralDiagnostics: - # Not in the spec yet. - - AverageWearCount - # New things, not quite finalized. renames: enums: OTASoftwareUpdateProvider: @@ -8236,16 +8176,12 @@ provisional: clusters: # Targeting Spring 2024 Matter release - - MicrowaveOvenControl - - MicrowaveOvenMode - DemandResponseLoadControl - BooleanStateConfiguration - ValveConfigurationAndControl - Timer - - OvenMode - LaundryDryerControls - EnergyEVSE - - OvenCavityOperationalState - ContentControl - ContentAppObserver - DeviceEnergyManagement @@ -9578,9 +9514,6 @@ - AliroBLEAdvertisingVersion - NumberOfAliroCredentialIssuerKeysSupported - NumberOfAliroEndpointKeysSupported - ICDManagement: - # Targeting Spring 2024 Matter release - - OperatingMode Thermostat: # Targeting Spring 2024 Matter release - PresetTypes @@ -9612,9 +9545,6 @@ - CancelPresetsSchedulesEditRequest - CommitPresetsSchedulesRequest - SetTemperatureSetpointHoldPolicy - RVCOperationalState: - # Targeting Spring 2024 Matter release - - GoHome UnitTesting: # Ideally none of UnitTesting would be exposed as public API, but # for now just start doing that for new additions to it. @@ -9656,10 +9586,6 @@ OperationSourceEnum: # Aliro is not ready yet. - Aliro - RVCRunMode: - ModeTag: - # Targeting Spring 2024 Matter release - - Mapping bitmaps: Thermostat: # Targeting Spring 2024 Matter release @@ -9981,11 +9907,11 @@ - Quiet - LowNoise - LowEnergy + - Vacation - Min - Max - Night - Day - - Vacation bitmaps: AccessControl: # Targeting 1.4 @@ -10084,9 +10010,625 @@ - release: "Future" versions: "future" + introduced: + clusters: + - DishwasherAlarm + - DishwasherMode + - ICDManagement + - LaundryWasherControls + - LaundryWasherMode + - MicrowaveOvenControl + - MicrowaveOvenMode + - OvenMode + - OvenCavityOperationalState + - RefrigeratorAlarm + - RefrigeratorAndTemperatureControlledCabinetMode + - TemperatureControl + attributes: + DishwasherAlarm: + - Mask + - Latch + - State + - Supported + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + DishwasherMode: + - SupportedModes + - CurrentMode + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + ICDManagement: + - IdleModeDuration + - ActiveModeDuration + - ActiveModeThreshold + - RegisteredClients + - ICDCounter + - ClientsSupportedPerFabric + - UserActiveModeTriggerHint + - UserActiveModeTriggerInstruction + - OperatingMode + - MaximumCheckInBackOff + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + LaundryWasherControls: + - SpinSpeeds + - SpinSpeedCurrent + - NumberOfRinses + - SupportedRinses + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + LaundryWasherMode: + - SupportedModes + - CurrentMode + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + MicrowaveOvenControl: + - CookTime + - MaxCookTime + - PowerSetting + - MinPower + - MaxPower + - PowerStep + # SupportedWatts and SelectedWattIndex are Provisional because WATTS is Provisional in Matter 1.4 + - WattRating + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + MicrowaveOvenMode: + - SupportedModes + - CurrentMode + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + OvenMode: + - SupportedModes + - CurrentMode + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + OvenCavityOperationalState: + - PhaseList + - CurrentPhase + - CountdownTime + - OperationalStateList + - OperationalState + - OperationalError + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + RefrigeratorAlarm: + - Mask + - State + - Supported + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + RefrigeratorAndTemperatureControlledCabinetMode: + - SupportedModes + - CurrentMode + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + TemperatureControl: + - TemperatureSetpoint + - MinTemperature + - MaxTemperature + - Step + - SelectedTemperatureLevel + - SupportedTemperatureLevels + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + commands: + DishwasherAlarm: + - Reset + - ModifyEnabledAlarms + DishwasherMode: + - ChangeToMode + - ChangeToModeResponse + DoorLock: + - UnboltDoor + ICDManagement: + - RegisterClient + - RegisterClientResponse + - UnregisterClient + - StayActiveRequest + - StayActiveResponse + LaundryWasherMode: + - ChangeToMode + - ChangeToModeResponse + MicrowaveOvenControl: + - SetCookingParameters + - AddMoreTime + OvenCavityOperationalState: + - Stop + - Start + - OperationalCommandResponse + OvenMode: + - ChangeToMode + - ChangeToModeResponse + RefrigeratorAndTemperatureControlledCabinetMode: + - ChangeToMode + - ChangeToModeResponse + RVCOperationalState: + - GoHome + TemperatureControl: + - SetTemperature + command fields: + DishwasherAlarm: + Reset: + - alarms + ModifyEnabledAlarms: + - mask + DishwasherMode: + ChangeToMode: + - newMode + ChangeToModeResponse: + - status + - statusText + DoorLock: + UnboltDoor: + - pinCode + ICDManagement: + RegisterClient: + - checkInNodeID + - monitoredSubject + - key + - verificationKey + - clientType + RegisterClientResponse: + - icdCounter + UnregisterClient: + - checkInNodeID + - verificationKey + StayActiveRequest: + - stayActiveDuration + StayActiveResponse: + - promisedActiveDuration + LaundryWasherMode: + ChangeToMode: + - newMode + ChangeToModeResponse: + - status + - statusText + MicrowaveOvenControl: + SetCookingParameters: + - cookMode + - cookTime + - powerSetting + # wattSettingIndex is provisional because WATTS is provisional in Matter 1.4 + - startAfterSetting + AddMoreTime: + - timeToAdd + OvenMode: + ChangeToMode: + - newMode + ChangeToModeResponse: + - status + - statusText + OvenCavityOperationalState: + OperationalCommandResponse: + - commandResponseState + RefrigeratorAndTemperatureControlledCabinetMode: + ChangeToMode: + - newMode + ChangeToModeResponse: + - status + - statusText + TemperatureControl: + SetTemperature: + - targetTemperature + - targetTemperatureLevel + structs: + DishwasherMode: + - ModeOptionStruct + - ModeTagStruct + ICDManagement: + - MonitoringRegistrationStruct + LaundryWasherMode: + - ModeOptionStruct + - ModeTagStruct + MicrowaveOvenMode: + - ModeTagStruct + - ModeOptionStruct + OvenMode: + - ModeTagStruct + - ModeOptionStruct + OvenCavityOperationalState: + - ErrorStateStruct + - OperationalStateStruct + RefrigeratorAndTemperatureControlledCabinetMode: + - ModeOptionStruct + - ModeTagStruct + struct fields: + DishwasherMode: + ModeOptionStruct: + - label + - mode + - modeTags + ModeTagStruct: + - mfgCode + - value + ICDManagement: + MonitoringRegistrationStruct: + - checkInNodeID + - monitoredSubject + - clientType + - fabricIndex + LaundryWasherMode: + ModeOptionStruct: + - label + - mode + - modeTags + ModeTagStruct: + - mfgCode + - value + MicrowaveOvenMode: + ModeTagStruct: + - mfgCode + - value + ModeOptionStruct: + - label + - mode + - modeTags + OvenMode: + ModeTagStruct: + - mfgCode + - value + ModeOptionStruct: + - label + - mode + - modeTags + OvenCavityOperationalState: + ErrorStateStruct: + - errorStateID + - errorStateLabel + - errorStateDetails + OperationalStateStruct: + - operationalStateID + - operationalStateLabel + RefrigeratorAndTemperatureControlledCabinetMode: + ModeOptionStruct: + - label + - mode + - modeTags + ModeTagStruct: + - mfgCode + - value + events: + DishwasherAlarm: + - Notify + OvenCavityOperationalState: + - OperationalError + - OperationCompletion + RefrigeratorAlarm: + - Notify + event fields: + DishwasherAlarm: + Notify: + - active + - inactive + - state + - mask + OvenCavityOperationalState: + OperationalError: + - errorState + OperationCompletion: + - completionErrorCode + - totalOperationalTime + - pausedTime + RefrigeratorAlarm: + Notify: + - active + - inactive + - state + - mask + enums: + DishwasherMode: + - ModeTag + ICDManagement: + - ClientTypeEnum + - OperatingModeEnum + MicrowaveOvenMode: + - ModeTag + OvenMode: + - ModeTag + LaundryWasherControls: + - NumberOfRinsesEnum + LaundryWasherMode: + - ModeTag + RefrigeratorAndTemperatureControlledCabinetMode: + - ModeTag + enum values: + DishwasherMode: + ModeTag: + - Normal + - Heavy + - Light + DoorLock: + DlLockState: + - Unlatched + DlLockType: + - Eurocylinder + LockOperationTypeEnum: + - Unlatch + ICDManagement: + ClientTypeEnum: + - Permanent + - Ephemeral + OperatingModeEnum: + - SIT + - LIT + LaundryWasherControls: + NumberOfRinsesEnum: + - None + - Normal + - Extra + - Max + LaundryWasherMode: + ModeTag: + - Normal + - Delicate + - Heavy + - Whites + MicrowaveOvenMode: + ModeTag: + - Normal + - Defrost + OvenMode: + ModeTag: + - Bake + - Convection + - Grill + - Roast + - Clean + - ConvectionBake + - ConvectionRoast + - Warming + - Proofing + - Steam + RefrigeratorAndTemperatureControlledCabinetMode: + ModeTag: + - RapidCool + - RapidFreeze + RVCRunMode: + ModeTag: + - Mapping + bitmaps: + DishwasherAlarm: + - AlarmBitmap + - Feature + ICDManagement: + - UserActiveModeTriggerBitmap + - Feature + LaundryWasherControls: + - Feature + MicrowaveOvenControl: + - Feature + RefrigeratorAlarm: + - AlarmBitmap + TemperatureControl: + - Feature + bitmap values: + DishwasherAlarm: + AlarmBitmap: + - DoorError + Feature: + - Reset + DoorLock: + Feature: + - Unbolt + ICDManagement: + UserActiveModeTriggerBitmap: + - PowerCycle + - SettingsMenu + - CustomInstruction + - DeviceManual + - ActuateSensor + - ActuateSensorSeconds + - ActuateSensorTimes + - ActuateSensorLightsBlink + - ResetButton + - ResetButtonLightsBlink + - ResetButtonSeconds + - ResetButtonTimes + - SetupButton + - SetupButtonSeconds + - SetupButtonLightsBlink + - SetupButtonTimes + - AppDefinedButton + Feature: + - CheckInProtocolSupport + - UserActiveModeTrigger + - LongIdleTimeSupport + - DynamicSitLitSupport + LaundryWasherControls: + Feature: + - Spin + - Rinse + MicrowaveOvenControl: + Feature: + - PowerAsNumber + # PowerInWatts is provisional because WATTS is provisional in Matter 1.4 + - PowerNumberLimits + RefrigeratorAlarm: + AlarmBitmap: + - DoorOpen + TemperatureControl: + Feature: + - TemperatureNumber + - TemperatureLevel + - TemperatureStep provisional: + attributes: + MicrowaveOvenControl: + # SupportedWatts and SelectedWattIndex are provisional because WATTS is provisional in Matter 1.4 + - SupportedWatts + - SelectedWattIndex + command fields: + MicrowaveOvenControl: + SetCookingParameters: + # wattSettingIndex is provisional because WATTS is provisional in Matter 1.4 + - wattSettingIndex + enums: + OvenCavityOperationalState: + # Not clear whether these will stay in the XML + - ErrorStateEnum + - OperationalStateEnum + enum values: + DishwasherMode: + # Not clear whether these will stay in the XML + ModeTag: + - Auto + - Quick + - Quiet + - LowNoise + - LowEnergy + - Vacation + - Min + - Max + - Night + - Day + LaundryWasherMode: + # Not clear whether these will stay in the XML + ModeTag: + - Auto + - Quick + - Quiet + - LowNoise + - LowEnergy + - Vacation + - Min + - Max + - Night + - Day + MicrowaveOvenMode: + # Not clear whether these will stay in the XML + ModeTag: + - Auto + - Quick + - Quiet + - LowNoise + - LowEnergy + - Vacation + - Min + - Max + - Night + - Day + OvenMode: + # Not clear whether these will stay in the XML + ModeTag: + - Auto + - Quick + - Quiet + - LowNoise + - LowEnergy + - Vacation + - Min + - Max + - Night + - Day + RefrigeratorAndTemperatureControlledCabinetMode: + # Not clear whether these will stay in the XML + ModeTag: + - Auto + - Quick + - Quiet + - LowNoise + - LowEnergy + - Vacation + - Min + - Max + - Night + - Day + bitmap values: + DishwasherAlarm: + AlarmBitmap: + # Various AlarmBitmap values are provisional in the Matter 1.4 specification + - InflowError + - DrainError + - TempTooLow + - TempTooHigh + - WaterLevelError + MicrowaveOvenControl: + Feature: + # PowerInWatts is provisional because WATTS is provisional in Matter 1.4 + - PowerInWatts device types: - BatteryStorage - HeatPump - SolarPower - WaterHeater + removed: + attributes: + DishwasherMode: + # Marked X in the spec, but for some reason present in the XML + - StartUpMode + - OnMode + LaundryWasherMode: + # Marked X in the spec, but for some reason present in the XML + - StartUpMode + - OnMode + OvenMode: + # Marked X in the spec, but for some reason present in the XML + - StartUpMode + - OnMode + RefrigeratorAndTemperatureControlledCabinetMode: + # Marked X in the spec, but for some reason present in the XML + - StartUpMode + - OnMode + commands: + OvenCavityOperationalState: + # Marked X in the spec, but for some reason present in the XML + - Pause + - Resume + bitmaps: + DishwasherMode: + # The one bit in this bitmap is marked X in the spec, but we can't have + # an empty bitmap. + - Feature + LaundryWasherMode: + # The one bit in this bitmap is marked X in the spec, but we can't have + # an empty bitmap. + - Feature + MicrowaveOvenMode: + # The one bit in this bitmap is marked X in the spec, but we can't have + # an empty bitmap. + - Feature + OvenMode: + # The one bit in this bitmap is marked X in the spec, but we can't have + # an empty bitmap. + - Feature + RefrigeratorAndTemperatureControlledCabinetMode: + # The one bit in this bitmap is marked X in the spec, but we can't have + # an empty bitmap. + - Feature diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index ce5c71d23f1d69..947877c053205c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -1794,12 +1794,6 @@ static BOOL AttributeIsSpecifiedInOvenModeCluster(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; } @@ -1902,12 +1896,6 @@ static BOOL AttributeIsSpecifiedInLaundryWasherModeCluster(AttributeId aAttribut case Attributes::CurrentMode::Id: { return YES; } - case Attributes::StartUpMode::Id: { - return YES; - } - case Attributes::OnMode::Id: { - return YES; - } case Attributes::GeneratedCommandList::Id: { return YES; } @@ -1938,12 +1926,6 @@ static BOOL AttributeIsSpecifiedInRefrigeratorAndTemperatureControlledCabinetMod case Attributes::CurrentMode::Id: { return YES; } - case Attributes::StartUpMode::Id: { - return YES; - } - case Attributes::OnMode::Id: { - return YES; - } case Attributes::GeneratedCommandList::Id: { return YES; } @@ -2145,12 +2127,6 @@ static BOOL AttributeIsSpecifiedInDishwasherModeCluster(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; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 975c3b63f4a587..cd2f99abca1e03 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -5385,36 +5385,6 @@ static id _Nullable DecodeAttributeValueForOvenModeCluster(AttributeId aAttribut 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; } @@ -5681,36 +5651,6 @@ static id _Nullable DecodeAttributeValueForLaundryWasherModeCluster(AttributeId 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; } @@ -5789,36 +5729,6 @@ static id _Nullable DecodeAttributeValueForRefrigeratorAndTemperatureControlledC 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; } @@ -6291,36 +6201,6 @@ static id _Nullable DecodeAttributeValueForDishwasherModeCluster(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; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 32c79ee20f13cf..1bd5e921d5e5da 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -4133,7 +4133,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * * Allows servers to ensure that listed clients are notified when a server is available for communication. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRBaseClusterICDManagement : MTRGenericBaseCluster /** @@ -4141,109 +4141,109 @@ MTR_PROVISIONALLY_AVAILABLE * * Register a client to the end device */ -- (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *)params completion:(void (^)(MTRICDManagementClusterRegisterClientResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *)params completion:(void (^)(MTRICDManagementClusterRegisterClientResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * Command UnregisterClient * * Unregister a client from an end device */ -- (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParams *)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * Command StayActiveRequest * * Request the end device to stay in Active Mode for an additional ActiveModeThreshold */ -- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams *)params completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams *)params completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeIdleModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeIdleModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeIdleModeDurationWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeIdleModeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeIdleModeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeActiveModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeActiveModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeActiveModeDurationWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeActiveModeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeActiveModeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeActiveModeThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeActiveModeThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeActiveModeThresholdWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeActiveModeThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeActiveModeThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeRegisteredClientsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeRegisteredClientsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeRegisteredClientsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeICDCounterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeICDCounterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeICDCounterWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeICDCounterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeICDCounterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeClientsSupportedPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeClientsSupportedPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeClientsSupportedPerFabricWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeClientsSupportedPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeClientsSupportedPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeUserActiveModeTriggerHintWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeUserActiveModeTriggerHintWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeUserActiveModeTriggerHintWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeUserActiveModeTriggerHintWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeUserActiveModeTriggerHintWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeUserActiveModeTriggerInstructionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeUserActiveModeTriggerInstructionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeUserActiveModeTriggerInstructionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeUserActiveModeTriggerInstructionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeUserActiveModeTriggerInstructionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaximumCheckInBackOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeMaximumCheckInBackOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeMaximumCheckInBackOffWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeMaximumCheckInBackOffWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeMaximumCheckInBackOffWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -4258,7 +4258,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -4367,107 +4367,91 @@ MTR_PROVISIONALLY_AVAILABLE * * This cluster supports remotely monitoring and, where supported, changing the operational state of an Oven. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRBaseClusterOvenCavityOperationalState : MTRGenericBaseCluster -/** - * Command Pause - * - * Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. - */ -- (void)pauseWithParams:(MTROvenCavityOperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)pauseWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; /** * Command Stop * * Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ -- (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)stopWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; + MTR_NEWLY_AVAILABLE; /** * Command Start * * 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. */ -- (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)startWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; -/** - * Command Resume - * - * 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). - */ -- (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)resumeWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; + MTR_NEWLY_AVAILABLE; -- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -4482,7 +4466,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -4491,7 +4475,7 @@ MTR_PROVISIONALLY_AVAILABLE * * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRBaseClusterOvenMode : MTRGenericBaseCluster /** @@ -4500,65 +4484,49 @@ MTR_PROVISIONALLY_AVAILABLE * This command is used to change device modes. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ -- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - 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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -4573,7 +4541,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -4754,7 +4722,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRBaseClusterLaundryWasherMode : MTRGenericBaseCluster /** @@ -4763,65 +4731,49 @@ MTR_PROVISIONALLY_AVAILABLE * This command is used to change device modes. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ -- (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *)params completion:(void (^)(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *)params completion:(void (^)(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - 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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -4836,7 +4788,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -4845,7 +4797,7 @@ MTR_PROVISIONALLY_AVAILABLE * * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode : MTRGenericBaseCluster /** @@ -4854,65 +4806,49 @@ MTR_PROVISIONALLY_AVAILABLE * This command is used to change device modes. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ -- (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams *)params completion:(void (^)(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams *)params completion:(void (^)(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - 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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -4927,7 +4863,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -4936,66 +4872,66 @@ MTR_PROVISIONALLY_AVAILABLE * * This cluster supports remotely monitoring and controlling the different types of functionality available to a washing device, such as a washing machine. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRBaseClusterLaundryWasherControls : MTRGenericBaseCluster -- (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeNumberOfRinsesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeNumberOfRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeNumberOfRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSupportedRinsesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSupportedRinsesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeSupportedRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSupportedRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -5010,7 +4946,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -5169,7 +5105,7 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) * * Attributes and commands for configuring the temperature control, and reporting temperature. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRBaseClusterTemperatureControl : MTRGenericBaseCluster /** @@ -5177,75 +5113,75 @@ MTR_PROVISIONALLY_AVAILABLE * * Set Temperature */ -- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)setTemperatureWithCompletion:(MTRStatusCompletion)completion - MTR_PROVISIONALLY_AVAILABLE; + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTemperatureSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeTemperatureSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeTemperatureSetpointWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeTemperatureSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeTemperatureSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeMinTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeMinTemperatureWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeMinTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeMinTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeMaxTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeMaxTemperatureWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeMaxTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeMaxTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeStepWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeSelectedTemperatureLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSelectedTemperatureLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSupportedTemperatureLevelsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSupportedTemperatureLevelsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeSupportedTemperatureLevelsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeSupportedTemperatureLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSupportedTemperatureLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -5260,7 +5196,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -5269,56 +5205,56 @@ MTR_PROVISIONALLY_AVAILABLE * * Attributes and commands for configuring the Refrigerator alarm. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRBaseClusterRefrigeratorAlarm : MTRGenericBaseCluster -- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -5333,7 +5269,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -5342,7 +5278,7 @@ MTR_PROVISIONALLY_AVAILABLE * * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRBaseClusterDishwasherMode : MTRGenericBaseCluster /** @@ -5351,65 +5287,49 @@ MTR_PROVISIONALLY_AVAILABLE * This command is used to change device modes. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ -- (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)params completion:(void (^)(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)params completion:(void (^)(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - 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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -5424,7 +5344,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -5638,7 +5558,7 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) * * Attributes and commands for configuring the Dishwasher alarm. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRBaseClusterDishwasherAlarm : MTRGenericBaseCluster /** @@ -5646,67 +5566,67 @@ MTR_PROVISIONALLY_AVAILABLE * * Reset alarm */ -- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * Command ModifyEnabledAlarms * * Modify enabled alarms */ -- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeLatchWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeLatchWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeLatchWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeLatchWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeLatchWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -5721,7 +5641,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -5730,50 +5650,50 @@ MTR_PROVISIONALLY_AVAILABLE * * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRBaseClusterMicrowaveOvenMode : MTRGenericBaseCluster -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - 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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -5788,7 +5708,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -5797,7 +5717,7 @@ MTR_PROVISIONALLY_AVAILABLE * * Attributes and commands for configuring the microwave oven control, and reporting cooking stats. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRBaseClusterMicrowaveOvenControl : MTRGenericBaseCluster /** @@ -5805,51 +5725,51 @@ MTR_PROVISIONALLY_AVAILABLE * * Set Cooking Parameters */ -- (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCookingParametersParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCookingParametersParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)setCookingParametersWithCompletion:(MTRStatusCompletion)completion - MTR_PROVISIONALLY_AVAILABLE; + MTR_NEWLY_AVAILABLE; /** * Command AddMoreTime * * Add More Cooking Time */ -- (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams *)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeCookTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeCookTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeCookTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeMaxCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeMaxCookTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeMaxCookTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeMaxCookTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributePowerSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributePowerSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributePowerSettingWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributePowerSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributePowerSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeMinPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeMinPowerWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeMinPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeMinPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeMaxPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeMaxPowerWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeMaxPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeMaxPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributePowerStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributePowerStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributePowerStepWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributePowerStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributePowerStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)readAttributeSupportedWattsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeSupportedWattsWithParams:(MTRSubscribeParams *)params @@ -5863,41 +5783,41 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeSelectedWattIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeWattRatingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeWattRatingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeWattRatingWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeWattRatingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeWattRatingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_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; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -5912,7 +5832,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -6069,9 +5989,9 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) * * On receipt of this command, the device SHALL start seeking the charging dock, if possible in the current state of the device. */ -- (void)goHomeWithParams:(MTRRVCOperationalStateClusterGoHomeParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)goHomeWithParams:(MTRRVCOperationalStateClusterGoHomeParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)goHomeWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; + MTR_NEWLY_AVAILABLE; - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams *)params @@ -8239,9 +8159,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * * This command causes the lock device to unlock the door without pulling the latch. */ -- (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)unboltDoorWithCompletion:(MTRStatusCompletion)completion - MTR_PROVISIONALLY_AVAILABLE; + MTR_NEWLY_AVAILABLE; /** * Command SetAliroReaderConfig * @@ -17270,41 +17190,41 @@ typedef NS_OPTIONS(uint32_t, MTRGroupKeyManagementFeature) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRICDManagementClientType) { - MTRICDManagementClientTypePermanent MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRICDManagementClientTypeEphemeral MTR_PROVISIONALLY_AVAILABLE = 0x01, -} MTR_PROVISIONALLY_AVAILABLE; + MTRICDManagementClientTypePermanent MTR_NEWLY_AVAILABLE = 0x00, + MTRICDManagementClientTypeEphemeral MTR_NEWLY_AVAILABLE = 0x01, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRICDManagementOperatingMode) { - MTRICDManagementOperatingModeSIT MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRICDManagementOperatingModeLIT MTR_PROVISIONALLY_AVAILABLE = 0x01, -} MTR_PROVISIONALLY_AVAILABLE; + MTRICDManagementOperatingModeSIT MTR_NEWLY_AVAILABLE = 0x00, + MTRICDManagementOperatingModeLIT MTR_NEWLY_AVAILABLE = 0x01, +} MTR_NEWLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTRICDManagementFeature) { - MTRICDManagementFeatureCheckInProtocolSupport MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRICDManagementFeatureUserActiveModeTrigger MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRICDManagementFeatureLongIdleTimeSupport MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRICDManagementFeatureDynamicSitLitSupport MTR_PROVISIONALLY_AVAILABLE = 0x8, -} MTR_PROVISIONALLY_AVAILABLE; + MTRICDManagementFeatureCheckInProtocolSupport MTR_NEWLY_AVAILABLE = 0x1, + MTRICDManagementFeatureUserActiveModeTrigger MTR_NEWLY_AVAILABLE = 0x2, + MTRICDManagementFeatureLongIdleTimeSupport MTR_NEWLY_AVAILABLE = 0x4, + MTRICDManagementFeatureDynamicSitLitSupport MTR_NEWLY_AVAILABLE = 0x8, +} MTR_NEWLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTRICDManagementUserActiveModeTriggerBitmap) { - MTRICDManagementUserActiveModeTriggerBitmapPowerCycle MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRICDManagementUserActiveModeTriggerBitmapSettingsMenu MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRICDManagementUserActiveModeTriggerBitmapCustomInstruction MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRICDManagementUserActiveModeTriggerBitmapDeviceManual MTR_PROVISIONALLY_AVAILABLE = 0x8, - MTRICDManagementUserActiveModeTriggerBitmapActuateSensor MTR_PROVISIONALLY_AVAILABLE = 0x10, - MTRICDManagementUserActiveModeTriggerBitmapActuateSensorSeconds MTR_PROVISIONALLY_AVAILABLE = 0x20, - MTRICDManagementUserActiveModeTriggerBitmapActuateSensorTimes MTR_PROVISIONALLY_AVAILABLE = 0x40, - MTRICDManagementUserActiveModeTriggerBitmapActuateSensorLightsBlink MTR_PROVISIONALLY_AVAILABLE = 0x80, - MTRICDManagementUserActiveModeTriggerBitmapResetButton MTR_PROVISIONALLY_AVAILABLE = 0x100, - MTRICDManagementUserActiveModeTriggerBitmapResetButtonLightsBlink MTR_PROVISIONALLY_AVAILABLE = 0x200, - MTRICDManagementUserActiveModeTriggerBitmapResetButtonSeconds MTR_PROVISIONALLY_AVAILABLE = 0x400, - MTRICDManagementUserActiveModeTriggerBitmapResetButtonTimes MTR_PROVISIONALLY_AVAILABLE = 0x800, - MTRICDManagementUserActiveModeTriggerBitmapSetupButton MTR_PROVISIONALLY_AVAILABLE = 0x1000, - MTRICDManagementUserActiveModeTriggerBitmapSetupButtonSeconds MTR_PROVISIONALLY_AVAILABLE = 0x2000, - MTRICDManagementUserActiveModeTriggerBitmapSetupButtonLightsBlink MTR_PROVISIONALLY_AVAILABLE = 0x4000, - MTRICDManagementUserActiveModeTriggerBitmapSetupButtonTimes MTR_PROVISIONALLY_AVAILABLE = 0x8000, - MTRICDManagementUserActiveModeTriggerBitmapAppDefinedButton MTR_PROVISIONALLY_AVAILABLE = 0x10000, -} MTR_PROVISIONALLY_AVAILABLE; + MTRICDManagementUserActiveModeTriggerBitmapPowerCycle MTR_NEWLY_AVAILABLE = 0x1, + MTRICDManagementUserActiveModeTriggerBitmapSettingsMenu MTR_NEWLY_AVAILABLE = 0x2, + MTRICDManagementUserActiveModeTriggerBitmapCustomInstruction MTR_NEWLY_AVAILABLE = 0x4, + MTRICDManagementUserActiveModeTriggerBitmapDeviceManual MTR_NEWLY_AVAILABLE = 0x8, + MTRICDManagementUserActiveModeTriggerBitmapActuateSensor MTR_NEWLY_AVAILABLE = 0x10, + MTRICDManagementUserActiveModeTriggerBitmapActuateSensorSeconds MTR_NEWLY_AVAILABLE = 0x20, + MTRICDManagementUserActiveModeTriggerBitmapActuateSensorTimes MTR_NEWLY_AVAILABLE = 0x40, + MTRICDManagementUserActiveModeTriggerBitmapActuateSensorLightsBlink MTR_NEWLY_AVAILABLE = 0x80, + MTRICDManagementUserActiveModeTriggerBitmapResetButton MTR_NEWLY_AVAILABLE = 0x100, + MTRICDManagementUserActiveModeTriggerBitmapResetButtonLightsBlink MTR_NEWLY_AVAILABLE = 0x200, + MTRICDManagementUserActiveModeTriggerBitmapResetButtonSeconds MTR_NEWLY_AVAILABLE = 0x400, + MTRICDManagementUserActiveModeTriggerBitmapResetButtonTimes MTR_NEWLY_AVAILABLE = 0x800, + MTRICDManagementUserActiveModeTriggerBitmapSetupButton MTR_NEWLY_AVAILABLE = 0x1000, + MTRICDManagementUserActiveModeTriggerBitmapSetupButtonSeconds MTR_NEWLY_AVAILABLE = 0x2000, + MTRICDManagementUserActiveModeTriggerBitmapSetupButtonLightsBlink MTR_NEWLY_AVAILABLE = 0x4000, + MTRICDManagementUserActiveModeTriggerBitmapSetupButtonTimes MTR_NEWLY_AVAILABLE = 0x8000, + MTRICDManagementUserActiveModeTriggerBitmapAppDefinedButton MTR_NEWLY_AVAILABLE = 0x10000, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRTimerStatus) { MTRTimerStatusRunning MTR_PROVISIONALLY_AVAILABLE = 0x00, @@ -17342,20 +17262,16 @@ typedef NS_ENUM(uint16_t, MTROvenModeModeTag) { MTROvenModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, MTROvenModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, MTROvenModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTROvenModeModeTagBake MTR_PROVISIONALLY_AVAILABLE = 0x4000, - MTROvenModeModeTagConvection MTR_PROVISIONALLY_AVAILABLE = 0x4001, - MTROvenModeModeTagGrill MTR_PROVISIONALLY_AVAILABLE = 0x4002, - MTROvenModeModeTagRoast MTR_PROVISIONALLY_AVAILABLE = 0x4003, - MTROvenModeModeTagClean MTR_PROVISIONALLY_AVAILABLE = 0x4004, - MTROvenModeModeTagConvectionBake MTR_PROVISIONALLY_AVAILABLE = 0x4005, - MTROvenModeModeTagConvectionRoast MTR_PROVISIONALLY_AVAILABLE = 0x4006, - MTROvenModeModeTagWarming MTR_PROVISIONALLY_AVAILABLE = 0x4007, - MTROvenModeModeTagProofing MTR_PROVISIONALLY_AVAILABLE = 0x4008, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTROvenModeFeature) { - MTROvenModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; + MTROvenModeModeTagBake MTR_NEWLY_AVAILABLE = 0x4000, + MTROvenModeModeTagConvection MTR_NEWLY_AVAILABLE = 0x4001, + MTROvenModeModeTagGrill MTR_NEWLY_AVAILABLE = 0x4002, + MTROvenModeModeTagRoast MTR_NEWLY_AVAILABLE = 0x4003, + MTROvenModeModeTagClean MTR_NEWLY_AVAILABLE = 0x4004, + MTROvenModeModeTagConvectionBake MTR_NEWLY_AVAILABLE = 0x4005, + MTROvenModeModeTagConvectionRoast MTR_NEWLY_AVAILABLE = 0x4006, + MTROvenModeModeTagWarming MTR_NEWLY_AVAILABLE = 0x4007, + MTROvenModeModeTagProofing MTR_NEWLY_AVAILABLE = 0x4008, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRLaundryDryerControlsDrynessLevel) { MTRLaundryDryerControlsDrynessLevelLow MTR_PROVISIONALLY_AVAILABLE = 0x00, @@ -17380,15 +17296,11 @@ typedef NS_ENUM(uint16_t, MTRLaundryWasherModeModeTag) { MTRLaundryWasherModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, MTRLaundryWasherModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, MTRLaundryWasherModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRLaundryWasherModeModeTagNormal MTR_PROVISIONALLY_AVAILABLE = 0x4000, - MTRLaundryWasherModeModeTagDelicate MTR_PROVISIONALLY_AVAILABLE = 0x4001, - MTRLaundryWasherModeModeTagHeavy MTR_PROVISIONALLY_AVAILABLE = 0x4002, - MTRLaundryWasherModeModeTagWhites MTR_PROVISIONALLY_AVAILABLE = 0x4003, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRLaundryWasherModeFeature) { - MTRLaundryWasherModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; + MTRLaundryWasherModeModeTagNormal MTR_NEWLY_AVAILABLE = 0x4000, + MTRLaundryWasherModeModeTagDelicate MTR_NEWLY_AVAILABLE = 0x4001, + MTRLaundryWasherModeModeTagHeavy MTR_NEWLY_AVAILABLE = 0x4002, + MTRLaundryWasherModeModeTagWhites MTR_NEWLY_AVAILABLE = 0x4003, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint16_t, MTRRefrigeratorAndTemperatureControlledCabinetModeModeTag) { MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, @@ -17401,25 +17313,21 @@ typedef NS_ENUM(uint16_t, MTRRefrigeratorAndTemperatureControlledCabinetModeMode MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagRapidCool MTR_PROVISIONALLY_AVAILABLE = 0x4000, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagRapidFreeze MTR_PROVISIONALLY_AVAILABLE = 0x4001, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRRefrigeratorAndTemperatureControlledCabinetModeFeature) { - MTRRefrigeratorAndTemperatureControlledCabinetModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagRapidCool MTR_NEWLY_AVAILABLE = 0x4000, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagRapidFreeze MTR_NEWLY_AVAILABLE = 0x4001, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRLaundryWasherControlsNumberOfRinses) { - MTRLaundryWasherControlsNumberOfRinsesNone MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRLaundryWasherControlsNumberOfRinsesNormal MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRLaundryWasherControlsNumberOfRinsesExtra MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRLaundryWasherControlsNumberOfRinsesMax MTR_PROVISIONALLY_AVAILABLE = 0x03, -} MTR_PROVISIONALLY_AVAILABLE; + MTRLaundryWasherControlsNumberOfRinsesNone MTR_NEWLY_AVAILABLE = 0x00, + MTRLaundryWasherControlsNumberOfRinsesNormal MTR_NEWLY_AVAILABLE = 0x01, + MTRLaundryWasherControlsNumberOfRinsesExtra MTR_NEWLY_AVAILABLE = 0x02, + MTRLaundryWasherControlsNumberOfRinsesMax MTR_NEWLY_AVAILABLE = 0x03, +} MTR_NEWLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTRLaundryWasherControlsFeature) { - MTRLaundryWasherControlsFeatureSpin MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRLaundryWasherControlsFeatureRinse MTR_PROVISIONALLY_AVAILABLE = 0x2, -} MTR_PROVISIONALLY_AVAILABLE; + MTRLaundryWasherControlsFeatureSpin MTR_NEWLY_AVAILABLE = 0x1, + MTRLaundryWasherControlsFeatureRinse MTR_NEWLY_AVAILABLE = 0x2, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint16_t, MTRRVCRunModeModeTag) { MTRRVCRunModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, @@ -17434,7 +17342,7 @@ typedef NS_ENUM(uint16_t, MTRRVCRunModeModeTag) { MTRRVCRunModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, MTRRVCRunModeModeTagIdle MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4000, MTRRVCRunModeModeTagCleaning MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4001, - MTRRVCRunModeModeTagMapping MTR_PROVISIONALLY_AVAILABLE = 0x4002, + MTRRVCRunModeModeTagMapping MTR_NEWLY_AVAILABLE = 0x4002, } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); typedef NS_ENUM(uint8_t, MTRRVCRunModeStatusCode) { @@ -17477,14 +17385,14 @@ typedef NS_OPTIONS(uint32_t, MTRRVCCleanModeFeature) { } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); typedef NS_OPTIONS(uint32_t, MTRTemperatureControlFeature) { - MTRTemperatureControlFeatureTemperatureNumber MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRTemperatureControlFeatureTemperatureLevel MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRTemperatureControlFeatureTemperatureStep MTR_PROVISIONALLY_AVAILABLE = 0x4, -} MTR_PROVISIONALLY_AVAILABLE; + MTRTemperatureControlFeatureTemperatureNumber MTR_NEWLY_AVAILABLE = 0x1, + MTRTemperatureControlFeatureTemperatureLevel MTR_NEWLY_AVAILABLE = 0x2, + MTRTemperatureControlFeatureTemperatureStep MTR_NEWLY_AVAILABLE = 0x4, +} MTR_NEWLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTRRefrigeratorAlarmAlarmBitmap) { - MTRRefrigeratorAlarmAlarmBitmapDoorOpen MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; + MTRRefrigeratorAlarmAlarmBitmapDoorOpen MTR_NEWLY_AVAILABLE = 0x1, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint16_t, MTRDishwasherModeModeTag) { MTRDishwasherModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, @@ -17497,14 +17405,10 @@ typedef NS_ENUM(uint16_t, MTRDishwasherModeModeTag) { MTRDishwasherModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, MTRDishwasherModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, MTRDishwasherModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRDishwasherModeModeTagNormal MTR_PROVISIONALLY_AVAILABLE = 0x4000, - MTRDishwasherModeModeTagHeavy MTR_PROVISIONALLY_AVAILABLE = 0x4001, - MTRDishwasherModeModeTagLight MTR_PROVISIONALLY_AVAILABLE = 0x4002, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRDishwasherModeFeature) { - MTRDishwasherModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; + MTRDishwasherModeModeTagNormal MTR_NEWLY_AVAILABLE = 0x4000, + MTRDishwasherModeModeTagHeavy MTR_NEWLY_AVAILABLE = 0x4001, + MTRDishwasherModeModeTagLight MTR_NEWLY_AVAILABLE = 0x4002, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRAirQuality) { MTRAirQualityUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, @@ -17572,15 +17476,15 @@ typedef NS_OPTIONS(uint32_t, MTRSmokeCOAlarmFeature) { typedef NS_OPTIONS(uint32_t, MTRDishwasherAlarmAlarmBitmap) { MTRDishwasherAlarmAlarmBitmapInflowError MTR_PROVISIONALLY_AVAILABLE = 0x1, MTRDishwasherAlarmAlarmBitmapDrainError MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRDishwasherAlarmAlarmBitmapDoorError MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRDishwasherAlarmAlarmBitmapDoorError MTR_NEWLY_AVAILABLE = 0x4, MTRDishwasherAlarmAlarmBitmapTempTooLow MTR_PROVISIONALLY_AVAILABLE = 0x8, MTRDishwasherAlarmAlarmBitmapTempTooHigh MTR_PROVISIONALLY_AVAILABLE = 0x10, MTRDishwasherAlarmAlarmBitmapWaterLevelError MTR_PROVISIONALLY_AVAILABLE = 0x20, -} MTR_PROVISIONALLY_AVAILABLE; +} MTR_NEWLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTRDishwasherAlarmFeature) { - MTRDishwasherAlarmFeatureReset MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; + MTRDishwasherAlarmFeatureReset MTR_NEWLY_AVAILABLE = 0x1, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint16_t, MTRMicrowaveOvenModeModeTag) { MTRMicrowaveOvenModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, @@ -17593,19 +17497,15 @@ typedef NS_ENUM(uint16_t, MTRMicrowaveOvenModeModeTag) { MTRMicrowaveOvenModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, MTRMicrowaveOvenModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, MTRMicrowaveOvenModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRMicrowaveOvenModeModeTagNormal MTR_PROVISIONALLY_AVAILABLE = 0x4000, - MTRMicrowaveOvenModeModeTagDefrost MTR_PROVISIONALLY_AVAILABLE = 0x4001, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRMicrowaveOvenModeFeature) { - MTRMicrowaveOvenModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; + MTRMicrowaveOvenModeModeTagNormal MTR_NEWLY_AVAILABLE = 0x4000, + MTRMicrowaveOvenModeModeTagDefrost MTR_NEWLY_AVAILABLE = 0x4001, +} MTR_NEWLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTRMicrowaveOvenControlFeature) { - MTRMicrowaveOvenControlFeaturePowerAsNumber MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRMicrowaveOvenControlFeaturePowerAsNumber MTR_NEWLY_AVAILABLE = 0x1, MTRMicrowaveOvenControlFeaturePowerInWatts MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRMicrowaveOvenControlFeaturePowerNumberLimits MTR_PROVISIONALLY_AVAILABLE = 0x4, -} MTR_PROVISIONALLY_AVAILABLE; + MTRMicrowaveOvenControlFeaturePowerNumberLimits MTR_NEWLY_AVAILABLE = 0x4, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTROperationalStateErrorState) { MTROperationalStateErrorStateNoError MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, @@ -18221,7 +18121,7 @@ typedef NS_ENUM(uint8_t, MTRDoorLockDlLockState) { MTRDoorLockDlLockStateNotFullyLocked MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, MTRDoorLockDlLockStateLocked MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, MTRDoorLockDlLockStateUnlocked MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRDoorLockDlLockStateUnlatched MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDoorLockDlLockStateUnlatched MTR_NEWLY_AVAILABLE = 0x03, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint8_t, MTRDoorLockDlLockType) { @@ -18236,7 +18136,7 @@ typedef NS_ENUM(uint8_t, MTRDoorLockDlLockType) { MTRDoorLockDlLockTypeInterconnectedLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, MTRDoorLockDlLockTypeDeadLatch MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, MTRDoorLockDlLockTypeDoorFurniture MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0A, - MTRDoorLockDlLockTypeEurocylinder MTR_PROVISIONALLY_AVAILABLE = 0x0B, + MTRDoorLockDlLockTypeEurocylinder MTR_NEWLY_AVAILABLE = 0x0B, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint8_t, MTRDoorLockDlStatus) { @@ -18336,7 +18236,7 @@ typedef NS_ENUM(uint8_t, MTRDoorLockLockOperationType) { MTRDoorLockLockOperationTypeUnlock MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, MTRDoorLockLockOperationTypeNonAccessUserEvent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, MTRDoorLockLockOperationTypeForcedUserEvent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, - MTRDoorLockLockOperationTypeUnlatch MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRDoorLockLockOperationTypeUnlatch MTR_NEWLY_AVAILABLE = 0x04, } MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); typedef NS_ENUM(uint8_t, MTRDoorLockDlLockOperationType) { @@ -18602,7 +18502,7 @@ typedef NS_OPTIONS(uint32_t, MTRDoorLockFeature) { MTRDoorLockFeatureYearDayAccessSchedules MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x400, MTRDoorLockFeatureYearDaySchedules MTR_DEPRECATED("Please use MTRDoorLockFeatureYearDayAccessSchedules", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x400, MTRDoorLockFeatureHolidaySchedules MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x800, - MTRDoorLockFeatureUnbolt MTR_PROVISIONALLY_AVAILABLE = 0x1000, + MTRDoorLockFeatureUnbolt MTR_NEWLY_AVAILABLE = 0x1000, MTRDoorLockFeatureAliroProvisioning MTR_PROVISIONALLY_AVAILABLE = 0x2000, MTRDoorLockFeatureAliroBLEUWB MTR_PROVISIONALLY_AVAILABLE = 0x4000, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 47d9cb14157fe9..bddf4c4de023ef 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -35313,34 +35313,6 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @implementation MTRBaseClusterOvenCavityOperationalState -- (void)pauseWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self pauseWithParams:nil completion:completion]; -} -- (void)pauseWithParams:(MTROvenCavityOperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROvenCavityOperationalStateClusterPauseParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OvenCavityOperationalState::Commands::Pause::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - (void)stopWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { [self stopWithParams:nil completion:completion]; @@ -35397,34 +35369,6 @@ - (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Null queue:self.callbackQueue completion:responseHandler]; } -- (void)resumeWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self resumeWithParams:nil completion:completion]; -} -- (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROvenCavityOperationalStateClusterResumeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OvenCavityOperationalState::Commands::Resume::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { @@ -35923,144 +35867,6 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OvenMode::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 = OvenMode::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 = OvenMode::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 = OvenMode::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 = OvenMode::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 = OvenMode::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 = OvenMode::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 = OvenMode::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 = OvenMode::Attributes::GeneratedCommandList::TypeInfo; @@ -37540,9 +37346,9 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37551,44 +37357,47 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (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 = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37598,9 +37407,9 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37609,9 +37418,9 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37620,150 +37429,9 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, 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 = LaundryWasherMode::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 = LaundryWasherMode::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 = LaundryWasherMode::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 = LaundryWasherMode::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 = LaundryWasherMode::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 = LaundryWasherMode::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 = LaundryWasherMode::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 = LaundryWasherMode::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 = LaundryWasherMode::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 = LaundryWasherMode::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 +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID @@ -37959,144 +37627,6 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::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 = RefrigeratorAndTemperatureControlledCabinetMode::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 = RefrigeratorAndTemperatureControlledCabinetMode::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 = RefrigeratorAndTemperatureControlledCabinetMode::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 = RefrigeratorAndTemperatureControlledCabinetMode::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 = RefrigeratorAndTemperatureControlledCabinetMode::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 = RefrigeratorAndTemperatureControlledCabinetMode::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 = RefrigeratorAndTemperatureControlledCabinetMode::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 = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; @@ -40050,144 +39580,6 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DishwasherMode::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 = DishwasherMode::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 = DishwasherMode::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 = DishwasherMode::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 = DishwasherMode::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 = DishwasherMode::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 = DishwasherMode::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 = DishwasherMode::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 = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index e58a3a60d8eee1..13eb74ac924bdf 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -117,25 +117,25 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeFixedLabelID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000040, MTRClusterIDTypeUserLabelID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000041, MTRClusterIDTypeBooleanStateID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000045, - MTRClusterIDTypeICDManagementID MTR_PROVISIONALLY_AVAILABLE = 0x00000046, + MTRClusterIDTypeICDManagementID MTR_NEWLY_AVAILABLE = 0x00000046, MTRClusterIDTypeTimerID MTR_PROVISIONALLY_AVAILABLE = 0x00000047, - MTRClusterIDTypeOvenCavityOperationalStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000048, - MTRClusterIDTypeOvenModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000049, + MTRClusterIDTypeOvenCavityOperationalStateID MTR_NEWLY_AVAILABLE = 0x00000048, + MTRClusterIDTypeOvenModeID MTR_NEWLY_AVAILABLE = 0x00000049, MTRClusterIDTypeLaundryDryerControlsID MTR_PROVISIONALLY_AVAILABLE = 0x0000004A, MTRClusterIDTypeModeSelectID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000050, - MTRClusterIDTypeLaundryWasherModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000051, - MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000052, - MTRClusterIDTypeLaundryWasherControlsID MTR_PROVISIONALLY_AVAILABLE = 0x00000053, + MTRClusterIDTypeLaundryWasherModeID MTR_NEWLY_AVAILABLE = 0x00000051, + MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID MTR_NEWLY_AVAILABLE = 0x00000052, + MTRClusterIDTypeLaundryWasherControlsID MTR_NEWLY_AVAILABLE = 0x00000053, MTRClusterIDTypeRVCRunModeID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000054, MTRClusterIDTypeRVCCleanModeID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000055, - MTRClusterIDTypeTemperatureControlID MTR_PROVISIONALLY_AVAILABLE = 0x00000056, - MTRClusterIDTypeRefrigeratorAlarmID MTR_PROVISIONALLY_AVAILABLE = 0x00000057, - MTRClusterIDTypeDishwasherModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000059, + MTRClusterIDTypeTemperatureControlID MTR_NEWLY_AVAILABLE = 0x00000056, + MTRClusterIDTypeRefrigeratorAlarmID MTR_NEWLY_AVAILABLE = 0x00000057, + MTRClusterIDTypeDishwasherModeID MTR_NEWLY_AVAILABLE = 0x00000059, MTRClusterIDTypeAirQualityID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000005B, MTRClusterIDTypeSmokeCOAlarmID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000005C, - MTRClusterIDTypeDishwasherAlarmID MTR_PROVISIONALLY_AVAILABLE = 0x0000005D, - MTRClusterIDTypeMicrowaveOvenModeID MTR_PROVISIONALLY_AVAILABLE = 0x0000005E, - MTRClusterIDTypeMicrowaveOvenControlID MTR_PROVISIONALLY_AVAILABLE = 0x0000005F, + MTRClusterIDTypeDishwasherAlarmID MTR_NEWLY_AVAILABLE = 0x0000005D, + MTRClusterIDTypeMicrowaveOvenModeID MTR_NEWLY_AVAILABLE = 0x0000005E, + MTRClusterIDTypeMicrowaveOvenControlID MTR_NEWLY_AVAILABLE = 0x0000005F, MTRClusterIDTypeOperationalStateID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000060, MTRClusterIDTypeRVCOperationalStateID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000061, MTRClusterIDTypeScenesManagementID MTR_PROVISIONALLY_AVAILABLE = 0x00000062, @@ -2096,21 +2096,21 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBooleanStateAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster ICDManagement attributes - MTRAttributeIDTypeClusterICDManagementAttributeIdleModeDurationID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterICDManagementAttributeActiveModeDurationID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterICDManagementAttributeActiveModeThresholdID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterICDManagementAttributeRegisteredClientsID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterICDManagementAttributeICDCounterID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterICDManagementAttributeClientsSupportedPerFabricID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerHintID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, - MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerInstructionID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, - MTRAttributeIDTypeClusterICDManagementAttributeOperatingModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, - MTRAttributeIDTypeClusterICDManagementAttributeMaximumCheckInBackOffID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, - MTRAttributeIDTypeClusterICDManagementAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterICDManagementAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterICDManagementAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterICDManagementAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterICDManagementAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterICDManagementAttributeIdleModeDurationID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterICDManagementAttributeActiveModeDurationID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterICDManagementAttributeActiveModeThresholdID MTR_NEWLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterICDManagementAttributeRegisteredClientsID MTR_NEWLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterICDManagementAttributeICDCounterID MTR_NEWLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterICDManagementAttributeClientsSupportedPerFabricID MTR_NEWLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerHintID MTR_NEWLY_AVAILABLE = 0x00000006, + MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerInstructionID MTR_NEWLY_AVAILABLE = 0x00000007, + MTRAttributeIDTypeClusterICDManagementAttributeOperatingModeID MTR_NEWLY_AVAILABLE = 0x00000008, + MTRAttributeIDTypeClusterICDManagementAttributeMaximumCheckInBackOffID MTR_NEWLY_AVAILABLE = 0x00000009, + MTRAttributeIDTypeClusterICDManagementAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterICDManagementAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterICDManagementAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterICDManagementAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterICDManagementAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster Timer attributes MTRAttributeIDTypeClusterTimerAttributeSetTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -2123,28 +2123,26 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTimerAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster OvenCavityOperationalState attributes - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributePhaseListID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCurrentPhaseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCountdownTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateListID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalErrorID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributePhaseListID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCurrentPhaseID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCountdownTimeID MTR_NEWLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateListID MTR_NEWLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateID MTR_NEWLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalErrorID MTR_NEWLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster OvenMode attributes - MTRAttributeIDTypeClusterOvenModeAttributeSupportedModesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterOvenModeAttributeCurrentModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterOvenModeAttributeStartUpModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterOvenModeAttributeOnModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterOvenModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterOvenModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOvenModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterOvenModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterOvenModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterOvenModeAttributeSupportedModesID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterOvenModeAttributeCurrentModeID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterOvenModeAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterOvenModeAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterOvenModeAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterOvenModeAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterOvenModeAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster LaundryDryerControls attributes MTRAttributeIDTypeClusterLaundryDryerControlsAttributeSupportedDrynessLevelsID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -2204,37 +2202,33 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterModeSelectAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster LaundryWasherMode attributes - MTRAttributeIDTypeClusterLaundryWasherModeAttributeSupportedModesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeCurrentModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeSupportedModesID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeCurrentModeID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster RefrigeratorAndTemperatureControlledCabinetMode attributes - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeSupportedModesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeCurrentModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeSupportedModesID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeCurrentModeID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster LaundryWasherControls attributes - MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedsID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSupportedRinsesID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterLaundryWasherControlsAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterLaundryWasherControlsAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterLaundryWasherControlsAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedsID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID MTR_NEWLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSupportedRinsesID MTR_NEWLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster RVCRunMode attributes MTRAttributeIDTypeClusterRVCRunModeAttributeSupportedModesID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000000, @@ -2255,38 +2249,36 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterRVCCleanModeAttributeClusterRevisionID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster TemperatureControl attributes - MTRAttributeIDTypeClusterTemperatureControlAttributeTemperatureSetpointID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterTemperatureControlAttributeMinTemperatureID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterTemperatureControlAttributeMaxTemperatureID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterTemperatureControlAttributeStepID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterTemperatureControlAttributeSelectedTemperatureLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterTemperatureControlAttributeSupportedTemperatureLevelsID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterTemperatureControlAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterTemperatureControlAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTemperatureControlAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterTemperatureControlAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterTemperatureControlAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterTemperatureControlAttributeTemperatureSetpointID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterTemperatureControlAttributeMinTemperatureID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterTemperatureControlAttributeMaxTemperatureID MTR_NEWLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterTemperatureControlAttributeStepID MTR_NEWLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterTemperatureControlAttributeSelectedTemperatureLevelID MTR_NEWLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterTemperatureControlAttributeSupportedTemperatureLevelsID MTR_NEWLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterTemperatureControlAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterTemperatureControlAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterTemperatureControlAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterTemperatureControlAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterTemperatureControlAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster RefrigeratorAlarm attributes - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeMaskID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeSupportedID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeMaskID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeStateID MTR_NEWLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeSupportedID MTR_NEWLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster DishwasherMode attributes - MTRAttributeIDTypeClusterDishwasherModeAttributeSupportedModesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterDishwasherModeAttributeCurrentModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterDishwasherModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterDishwasherModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterDishwasherModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterDishwasherModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterDishwasherModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterDishwasherModeAttributeSupportedModesID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterDishwasherModeAttributeCurrentModeID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterDishwasherModeAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterDishwasherModeAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterDishwasherModeAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterDishwasherModeAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterDishwasherModeAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster AirQuality attributes MTRAttributeIDTypeClusterAirQualityAttributeAirQualityID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00000000, @@ -2317,40 +2309,40 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterSmokeCOAlarmAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster DishwasherAlarm attributes - MTRAttributeIDTypeClusterDishwasherAlarmAttributeMaskID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterDishwasherAlarmAttributeLatchID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterDishwasherAlarmAttributeStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterDishwasherAlarmAttributeSupportedID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterDishwasherAlarmAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterDishwasherAlarmAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterDishwasherAlarmAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterDishwasherAlarmAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterDishwasherAlarmAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterDishwasherAlarmAttributeMaskID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterDishwasherAlarmAttributeLatchID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterDishwasherAlarmAttributeStateID MTR_NEWLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterDishwasherAlarmAttributeSupportedID MTR_NEWLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterDishwasherAlarmAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterDishwasherAlarmAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterDishwasherAlarmAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterDishwasherAlarmAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterDishwasherAlarmAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster MicrowaveOvenMode attributes - MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeSupportedModesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeCurrentModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeSupportedModesID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeCurrentModeID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster MicrowaveOvenControl attributes - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeCookTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxCookTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerSettingID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMinPowerID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxPowerID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerStepID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeCookTimeID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxCookTimeID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerSettingID MTR_NEWLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMinPowerID MTR_NEWLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxPowerID MTR_NEWLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerStepID MTR_NEWLY_AVAILABLE = 0x00000005, MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeSupportedWattsID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeSelectedWattIndexID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeWattRatingID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeWattRatingID MTR_NEWLY_AVAILABLE = 0x00000008, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster OperationalState attributes MTRAttributeIDTypeClusterOperationalStateAttributePhaseListID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000000, @@ -6254,11 +6246,11 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetReadAllIndicesResponseID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000005, // Cluster ICDManagement commands - MTRCommandIDTypeClusterICDManagementCommandRegisterClientID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterICDManagementCommandRegisterClientResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRCommandIDTypeClusterICDManagementCommandUnregisterClientID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRCommandIDTypeClusterICDManagementCommandStayActiveRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRCommandIDTypeClusterICDManagementCommandStayActiveResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRCommandIDTypeClusterICDManagementCommandRegisterClientID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterICDManagementCommandRegisterClientResponseID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterICDManagementCommandUnregisterClientID MTR_NEWLY_AVAILABLE = 0x00000002, + MTRCommandIDTypeClusterICDManagementCommandStayActiveRequestID MTR_NEWLY_AVAILABLE = 0x00000003, + MTRCommandIDTypeClusterICDManagementCommandStayActiveResponseID MTR_NEWLY_AVAILABLE = 0x00000004, // Cluster Timer commands MTRCommandIDTypeClusterTimerCommandSetTimerID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -6267,15 +6259,13 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterTimerCommandReduceTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, // Cluster OvenCavityOperationalState commands - MTRCommandIDTypeClusterOvenCavityOperationalStateCommandPauseID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterOvenCavityOperationalStateCommandStopID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRCommandIDTypeClusterOvenCavityOperationalStateCommandStartID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRCommandIDTypeClusterOvenCavityOperationalStateCommandResumeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRCommandIDTypeClusterOvenCavityOperationalStateCommandOperationalCommandResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRCommandIDTypeClusterOvenCavityOperationalStateCommandStopID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterOvenCavityOperationalStateCommandStartID MTR_NEWLY_AVAILABLE = 0x00000002, + MTRCommandIDTypeClusterOvenCavityOperationalStateCommandOperationalCommandResponseID MTR_NEWLY_AVAILABLE = 0x00000004, // Cluster OvenMode commands - MTRCommandIDTypeClusterOvenModeCommandChangeToModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterOvenModeCommandChangeToModeResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterOvenModeCommandChangeToModeID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterOvenModeCommandChangeToModeResponseID MTR_NEWLY_AVAILABLE = 0x00000001, // Cluster ModeSelect deprecated command id names MTRClusterModeSelectCommandChangeToModeID @@ -6286,12 +6276,12 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterModeSelectCommandChangeToModeID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, // Cluster LaundryWasherMode commands - MTRCommandIDTypeClusterLaundryWasherModeCommandChangeToModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterLaundryWasherModeCommandChangeToModeResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterLaundryWasherModeCommandChangeToModeID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterLaundryWasherModeCommandChangeToModeResponseID MTR_NEWLY_AVAILABLE = 0x00000001, // Cluster RefrigeratorAndTemperatureControlledCabinetMode commands - MTRCommandIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeCommandChangeToModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeCommandChangeToModeResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeCommandChangeToModeID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeCommandChangeToModeResponseID MTR_NEWLY_AVAILABLE = 0x00000001, // Cluster RVCRunMode commands MTRCommandIDTypeClusterRVCRunModeCommandChangeToModeID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000000, @@ -6302,22 +6292,22 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterRVCCleanModeCommandChangeToModeResponseID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000001, // Cluster TemperatureControl commands - MTRCommandIDTypeClusterTemperatureControlCommandSetTemperatureID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterTemperatureControlCommandSetTemperatureID MTR_NEWLY_AVAILABLE = 0x00000000, // Cluster DishwasherMode commands - MTRCommandIDTypeClusterDishwasherModeCommandChangeToModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterDishwasherModeCommandChangeToModeResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterDishwasherModeCommandChangeToModeID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterDishwasherModeCommandChangeToModeResponseID MTR_NEWLY_AVAILABLE = 0x00000001, // Cluster SmokeCOAlarm commands MTRCommandIDTypeClusterSmokeCOAlarmCommandSelfTestRequestID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00000000, // Cluster DishwasherAlarm commands - MTRCommandIDTypeClusterDishwasherAlarmCommandResetID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterDishwasherAlarmCommandModifyEnabledAlarmsID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterDishwasherAlarmCommandResetID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterDishwasherAlarmCommandModifyEnabledAlarmsID MTR_NEWLY_AVAILABLE = 0x00000001, // Cluster MicrowaveOvenControl commands - MTRCommandIDTypeClusterMicrowaveOvenControlCommandSetCookingParametersID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterMicrowaveOvenControlCommandAddMoreTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterMicrowaveOvenControlCommandSetCookingParametersID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterMicrowaveOvenControlCommandAddMoreTimeID MTR_NEWLY_AVAILABLE = 0x00000001, // Cluster OperationalState commands MTRCommandIDTypeClusterOperationalStateCommandPauseID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000000, @@ -6330,7 +6320,7 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterRVCOperationalStateCommandPauseID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000000, MTRCommandIDTypeClusterRVCOperationalStateCommandResumeID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000003, MTRCommandIDTypeClusterRVCOperationalStateCommandOperationalCommandResponseID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000004, - MTRCommandIDTypeClusterRVCOperationalStateCommandGoHomeID MTR_PROVISIONALLY_AVAILABLE = 0x00000080, + MTRCommandIDTypeClusterRVCOperationalStateCommandGoHomeID MTR_NEWLY_AVAILABLE = 0x00000080, // Cluster ScenesManagement commands MTRCommandIDTypeClusterScenesManagementCommandAddSceneID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -6509,7 +6499,7 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterDoorLockCommandGetCredentialStatusID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000024, MTRCommandIDTypeClusterDoorLockCommandGetCredentialStatusResponseID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000025, MTRCommandIDTypeClusterDoorLockCommandClearCredentialID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000026, - MTRCommandIDTypeClusterDoorLockCommandUnboltDoorID MTR_PROVISIONALLY_AVAILABLE = 0x00000027, + MTRCommandIDTypeClusterDoorLockCommandUnboltDoorID MTR_NEWLY_AVAILABLE = 0x00000027, MTRCommandIDTypeClusterDoorLockCommandSetAliroReaderConfigID MTR_PROVISIONALLY_AVAILABLE = 0x00000028, MTRCommandIDTypeClusterDoorLockCommandClearAliroReaderConfigID MTR_PROVISIONALLY_AVAILABLE = 0x00000029, @@ -7329,11 +7319,11 @@ typedef NS_ENUM(uint32_t, MTREventIDType) { MTREventIDTypeClusterBooleanStateEventStateChangeID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, // Cluster OvenCavityOperationalState events - MTREventIDTypeClusterOvenCavityOperationalStateEventOperationalErrorID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTREventIDTypeClusterOvenCavityOperationalStateEventOperationCompletionID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTREventIDTypeClusterOvenCavityOperationalStateEventOperationalErrorID MTR_NEWLY_AVAILABLE = 0x00000000, + MTREventIDTypeClusterOvenCavityOperationalStateEventOperationCompletionID MTR_NEWLY_AVAILABLE = 0x00000001, // Cluster RefrigeratorAlarm events - MTREventIDTypeClusterRefrigeratorAlarmEventNotifyID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTREventIDTypeClusterRefrigeratorAlarmEventNotifyID MTR_NEWLY_AVAILABLE = 0x00000000, // Cluster SmokeCOAlarm events MTREventIDTypeClusterSmokeCOAlarmEventSmokeAlarmID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00000000, @@ -7349,7 +7339,7 @@ typedef NS_ENUM(uint32_t, MTREventIDType) { MTREventIDTypeClusterSmokeCOAlarmEventAllClearID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000000A, // Cluster DishwasherAlarm events - MTREventIDTypeClusterDishwasherAlarmEventNotifyID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTREventIDTypeClusterDishwasherAlarmEventNotifyID MTR_NEWLY_AVAILABLE = 0x00000000, // Cluster OperationalState events MTREventIDTypeClusterOperationalStateEventOperationalErrorID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000000, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm index 96b2c0cd3bf3e6..9f8206f2e04d8f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm @@ -2737,14 +2737,6 @@ result = @"CurrentMode"; break; - case MTRAttributeIDTypeClusterOvenModeAttributeStartUpModeID: - result = @"StartUpMode"; - break; - - case MTRAttributeIDTypeClusterOvenModeAttributeOnModeID: - result = @"OnMode"; - break; - case MTRAttributeIDTypeClusterOvenModeAttributeGeneratedCommandListID: result = @"GeneratedCommandList"; break; @@ -2878,14 +2870,6 @@ result = @"CurrentMode"; break; - case MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID: - result = @"StartUpMode"; - break; - - case MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID: - result = @"OnMode"; - break; - case MTRAttributeIDTypeClusterLaundryWasherModeAttributeGeneratedCommandListID: result = @"GeneratedCommandList"; break; @@ -2925,14 +2909,6 @@ result = @"CurrentMode"; break; - case MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID: - result = @"StartUpMode"; - break; - - case MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID: - result = @"OnMode"; - break; - case MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeGeneratedCommandListID: result = @"GeneratedCommandList"; break; @@ -3195,14 +3171,6 @@ result = @"CurrentMode"; break; - case MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID: - result = @"StartUpMode"; - break; - - case MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID: - result = @"OnMode"; - break; - case MTRAttributeIDTypeClusterDishwasherModeAttributeGeneratedCommandListID: result = @"GeneratedCommandList"; break; @@ -9254,10 +9222,6 @@ switch (commandID) { - case MTRCommandIDTypeClusterOvenCavityOperationalStateCommandPauseID: - result = @"Pause"; - break; - case MTRCommandIDTypeClusterOvenCavityOperationalStateCommandStopID: result = @"Stop"; break; @@ -9266,10 +9230,6 @@ result = @"Start"; break; - case MTRCommandIDTypeClusterOvenCavityOperationalStateCommandResumeID: - result = @"Resume"; - break; - default: result = [NSString stringWithFormat:@"", commandID]; break; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 9babe0a6251f1e..064c5270bde7c5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -1930,42 +1930,42 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * Cluster ICD Management * Allows servers to ensure that listed clients are notified when a server is available for communication. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRClusterICDManagement : MTRGenericCluster -- (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterRegisterClientResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterRegisterClientResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeIdleModeDurationWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeIdleModeDurationWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeActiveModeDurationWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeActiveModeDurationWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeActiveModeThresholdWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeActiveModeThresholdWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeICDCounterWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeICDCounterWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeClientsSupportedPerFabricWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClientsSupportedPerFabricWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeUserActiveModeTriggerHintWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeUserActiveModeTriggerHintWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeUserActiveModeTriggerInstructionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeUserActiveModeTriggerInstructionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeOperatingModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeOperatingModeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeMaximumCheckInBackOffWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeMaximumCheckInBackOffWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -1980,7 +1980,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -2035,43 +2035,37 @@ MTR_PROVISIONALLY_AVAILABLE * Cluster Oven Cavity Operational State * This cluster supports remotely monitoring and, where supported, changing the operational state of an Oven. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRClusterOvenCavityOperationalState : MTRGenericCluster -- (void)pauseWithParams:(MTROvenCavityOperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)pauseWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; -- (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)stopWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; -- (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + MTR_NEWLY_AVAILABLE; +- (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)startWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; -- (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)resumeWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; + MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2086,7 +2080,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -2094,32 +2088,24 @@ MTR_PROVISIONALLY_AVAILABLE * Cluster Oven Mode * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRClusterOvenMode : MTRGenericCluster -- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_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)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_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)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2134,7 +2120,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -2235,32 +2221,24 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * Cluster Laundry Washer Mode * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRClusterLaundryWasherMode : MTRGenericCluster -- (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_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)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2275,7 +2253,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -2283,32 +2261,24 @@ MTR_PROVISIONALLY_AVAILABLE * Cluster Refrigerator And Temperature Controlled Cabinet Mode * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRClusterRefrigeratorAndTemperatureControlledCabinetMode : MTRGenericCluster -- (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_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)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_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_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2323,7 +2293,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -2331,30 +2301,30 @@ MTR_PROVISIONALLY_AVAILABLE * Cluster Laundry Washer Controls * This cluster supports remotely monitoring and controlling the different types of functionality available to a washing device, such as a washing machine. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRClusterLaundryWasherControls : MTRGenericCluster -- (NSDictionary * _Nullable)readAttributeSpinSpeedsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSpinSpeedsWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeSpinSpeedCurrentWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSpinSpeedCurrentWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_NEWLY_AVAILABLE; +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeNumberOfRinsesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeNumberOfRinsesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeSupportedRinsesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedRinsesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2369,7 +2339,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -2457,34 +2427,34 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) * Cluster Temperature Control * Attributes and commands for configuring the temperature control, and reporting temperature. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRClusterTemperatureControl : MTRGenericCluster -- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)setTemperatureWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion - MTR_PROVISIONALLY_AVAILABLE; + MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeTemperatureSetpointWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeTemperatureSetpointWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeMinTemperatureWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeMinTemperatureWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeMaxTemperatureWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeMaxTemperatureWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeStepWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeStepWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeSelectedTemperatureLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSelectedTemperatureLevelWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeSupportedTemperatureLevelsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedTemperatureLevelsWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2499,7 +2469,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -2507,24 +2477,24 @@ MTR_PROVISIONALLY_AVAILABLE * Cluster Refrigerator Alarm * Attributes and commands for configuring the Refrigerator alarm. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRClusterRefrigeratorAlarm : MTRGenericCluster -- (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2539,7 +2509,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -2547,32 +2517,24 @@ MTR_PROVISIONALLY_AVAILABLE * Cluster Dishwasher Mode * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRClusterDishwasherMode : MTRGenericCluster -- (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_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)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_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)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2587,7 +2549,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -2697,29 +2659,29 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) * Cluster Dishwasher Alarm * Attributes and commands for configuring the Dishwasher alarm. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRClusterDishwasherAlarm : MTRGenericCluster -- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeLatchWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeLatchWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2734,7 +2696,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -2742,22 +2704,22 @@ MTR_PROVISIONALLY_AVAILABLE * Cluster Microwave Oven Mode * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRClusterMicrowaveOvenMode : MTRGenericCluster -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2772,7 +2734,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -2780,41 +2742,41 @@ MTR_PROVISIONALLY_AVAILABLE * Cluster Microwave Oven Control * Attributes and commands for configuring the microwave oven control, and reporting cooking stats. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRClusterMicrowaveOvenControl : MTRGenericCluster -- (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCookingParametersParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCookingParametersParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)setCookingParametersWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion - MTR_PROVISIONALLY_AVAILABLE; -- (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + MTR_NEWLY_AVAILABLE; +- (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeCookTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCookTimeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeMaxCookTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeMaxCookTimeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributePowerSettingWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributePowerSettingWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeMinPowerWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeMinPowerWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeMaxPowerWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeMaxPowerWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributePowerStepWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributePowerStepWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeSupportedWattsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeSelectedWattIndexWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeWattRatingWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeWattRatingWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2829,7 +2791,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -2905,9 +2867,9 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (void)resumeWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (void)goHomeWithParams:(MTRRVCOperationalStateClusterGoHomeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)goHomeWithParams:(MTRRVCOperationalStateClusterGoHomeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)goHomeWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; + MTR_NEWLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); @@ -3897,9 +3859,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)unboltDoorWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion - MTR_PROVISIONALLY_AVAILABLE; + MTR_NEWLY_AVAILABLE; - (void)setAliroReaderConfigWithParams:(MTRDoorLockClusterSetAliroReaderConfigParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)clearAliroReaderConfigWithParams:(MTRDoorLockClusterClearAliroReaderConfigParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)clearAliroReaderConfigWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 1d6828deddb868..f19bcdd2b23836 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -6075,37 +6075,6 @@ - (void)reduceTimeWithParams:(MTRTimerClusterReduceTimeParams *)params expectedV @implementation MTRClusterOvenCavityOperationalState -- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)pauseWithParams:(MTROvenCavityOperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROvenCavityOperationalStateClusterPauseParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OvenCavityOperationalState::Commands::Pause::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - - (void)stopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { [self stopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; @@ -6168,37 +6137,6 @@ - (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Null completion:responseHandler]; } -- (void)resumeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self resumeWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROvenCavityOperationalStateClusterResumeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OvenCavityOperationalState::Commands::Resume::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - - (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributePhaseListID) params:params]; @@ -6295,38 +6233,6 @@ - (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params ex return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeCurrentModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeStartUpModeID) 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:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeOnModeID) 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:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeGeneratedCommandListID) params:params]; @@ -6565,38 +6471,6 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeCurrentModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) 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:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) 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:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeGeneratedCommandListID) params:params]; @@ -6663,38 +6537,6 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeCurrentModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) 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:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) 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:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeGeneratedCommandListID) params:params]; @@ -7098,38 +6940,6 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeCurrentModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) 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:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) 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:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeGeneratedCommandListID) params:params]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 573d6581ced8f0..99fb9907578172 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -3740,18 +3740,18 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRICDManagementClusterRegisterClientParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull checkInNodeID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull checkInNodeID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull monitoredSubject MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull monitoredSubject MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSData * _Nonnull key MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nonnull key MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSData * _Nullable verificationKey MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nullable verificationKey MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull clientType MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull clientType MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3778,10 +3778,10 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRICDManagementClusterRegisterClientResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull icdCounter MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull icdCounter MTR_NEWLY_AVAILABLE; /** * Initialize an MTRICDManagementClusterRegisterClientResponseParams with a response-value dictionary @@ -3794,15 +3794,15 @@ MTR_PROVISIONALLY_AVAILABLE * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; + error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRICDManagementClusterUnregisterClientParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull checkInNodeID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull checkInNodeID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSData * _Nullable verificationKey MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nullable verificationKey MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3829,10 +3829,10 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRICDManagementClusterStayActiveRequestParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull stayActiveDuration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull stayActiveDuration MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3859,10 +3859,10 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRICDManagementClusterStayActiveResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull promisedActiveDuration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull promisedActiveDuration MTR_NEWLY_AVAILABLE; /** * Initialize an MTRICDManagementClusterStayActiveResponseParams with a response-value dictionary @@ -3875,7 +3875,7 @@ MTR_PROVISIONALLY_AVAILABLE * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; + error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE @@ -3996,35 +3996,7 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenCavityOperationalStateClusterPauseParams : NSObject -/** - * 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 +MTR_NEWLY_AVAILABLE @interface MTROvenCavityOperationalStateClusterStopParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). @@ -4052,7 +4024,7 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTROvenCavityOperationalStateClusterStartParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). @@ -4080,38 +4052,10 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenCavityOperationalStateClusterResumeParams : NSObject -/** - * 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 +MTR_NEWLY_AVAILABLE @interface MTROvenCavityOperationalStateClusterOperationalCommandResponseParams : NSObject -@property (nonatomic, copy) MTROvenCavityOperationalStateClusterErrorStateStruct * _Nonnull commandResponseState MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTROvenCavityOperationalStateClusterErrorStateStruct * _Nonnull commandResponseState MTR_NEWLY_AVAILABLE; /** * Initialize an MTROvenCavityOperationalStateClusterOperationalCommandResponseParams with a response-value dictionary @@ -4124,13 +4068,13 @@ MTR_PROVISIONALLY_AVAILABLE * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; + error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTROvenModeClusterChangeToModeParams : NSObject -@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4157,12 +4101,12 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTROvenModeClusterChangeToModeResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable statusText MTR_NEWLY_AVAILABLE; /** * Initialize an MTROvenModeClusterChangeToModeResponseParams with a response-value dictionary @@ -4175,7 +4119,7 @@ MTR_PROVISIONALLY_AVAILABLE * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; + error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4208,10 +4152,10 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRLaundryWasherModeClusterChangeToModeParams : NSObject -@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4238,12 +4182,12 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRLaundryWasherModeClusterChangeToModeResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable statusText MTR_NEWLY_AVAILABLE; /** * Initialize an MTRLaundryWasherModeClusterChangeToModeResponseParams with a response-value dictionary @@ -4256,13 +4200,13 @@ MTR_PROVISIONALLY_AVAILABLE * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; + error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams : NSObject -@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4289,12 +4233,12 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable statusText MTR_NEWLY_AVAILABLE; /** * Initialize an MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams with a response-value dictionary @@ -4307,7 +4251,7 @@ MTR_PROVISIONALLY_AVAILABLE * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; + error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; @end MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @@ -4412,12 +4356,12 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRTemperatureControlClusterSetTemperatureParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable targetTemperature MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable targetTemperature MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable targetTemperatureLevel MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable targetTemperatureLevel MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4444,10 +4388,10 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRDishwasherModeClusterChangeToModeParams : NSObject -@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4474,12 +4418,12 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRDishwasherModeClusterChangeToModeResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable statusText MTR_NEWLY_AVAILABLE; /** * Initialize an MTRDishwasherModeClusterChangeToModeResponseParams with a response-value dictionary @@ -4492,7 +4436,7 @@ MTR_PROVISIONALLY_AVAILABLE * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; + error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; @end MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) @@ -4523,10 +4467,10 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRDishwasherAlarmClusterResetParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull alarms MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull alarms MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4553,10 +4497,10 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRDishwasherAlarmClusterModifyEnabledAlarmsParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull mask MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull mask MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4583,18 +4527,18 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRMicrowaveOvenControlClusterSetCookingParametersParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable cookMode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable cookMode MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable cookTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable cookTime MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable powerSetting MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable powerSetting MTR_NEWLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable wattSettingIndex MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable startAfterSetting MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable startAfterSetting MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4621,10 +4565,10 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRMicrowaveOvenControlClusterAddMoreTimeParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull timeToAdd MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull timeToAdd MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4857,7 +4801,7 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRVCOperationalStateClusterGoHomeParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). @@ -7274,10 +7218,10 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRDoorLockClusterUnboltDoorParams : NSObject -@property (nonatomic, copy) NSData * _Nullable pinCode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nullable pinCode MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 318455a23b9210..3c060416f06723 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -10717,79 +10717,6 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROvenCavityOperationalStateClusterPauseParams -- (instancetype)init -{ - if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTROvenCavityOperationalStateClusterPauseParams alloc] init]; - - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTROvenCavityOperationalStateClusterPauseParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Type encodableStruct; - ListFreer listFreer; - - 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 MTROvenCavityOperationalStateClusterStopParams - (instancetype)init { @@ -10936,79 +10863,6 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROvenCavityOperationalStateClusterResumeParams -- (instancetype)init -{ - if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTROvenCavityOperationalStateClusterResumeParams alloc] init]; - - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTROvenCavityOperationalStateClusterResumeParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::Type encodableStruct; - ListFreer listFreer; - - 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 MTROvenCavityOperationalStateClusterOperationalCommandResponseParams - (instancetype)init { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index 89f78e7a2422fc..a1fd2d1dc80a2e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -706,12 +706,6 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface MTROvenCavityOperationalStateClusterPauseParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - @interface MTROvenCavityOperationalStateClusterStopParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @@ -724,12 +718,6 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface MTROvenCavityOperationalStateClusterResumeParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - @interface MTROvenCavityOperationalStateClusterOperationalCommandResponseParams (InternalMethods) - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType &)decodableStruct; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 9f679a7a305e8d..8c3e822741c943 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -812,50 +812,50 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSNumber * _Nonnull stateValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRICDManagementClusterMonitoringRegistrationStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull checkInNodeID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull monitoredSubject MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull clientType MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull checkInNodeID MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull monitoredSubject MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull clientType MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTROvenCavityOperationalStateClusterErrorStateStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull errorStateID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable errorStateLabel MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable errorStateDetails MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull errorStateID MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable errorStateLabel MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable errorStateDetails MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTROvenCavityOperationalStateClusterOperationalStateStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull operationalStateID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable operationalStateLabel MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull operationalStateID MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable operationalStateLabel MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTROvenCavityOperationalStateClusterOperationalErrorEvent : NSObject -@property (nonatomic, copy) MTROvenCavityOperationalStateClusterErrorStateStruct * _Nonnull errorState MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTROvenCavityOperationalStateClusterErrorStateStruct * _Nonnull errorState MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTROvenCavityOperationalStateClusterOperationCompletionEvent : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull completionErrorCode MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable totalOperationalTime MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable pausedTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull completionErrorCode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable totalOperationalTime MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable pausedTime MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTROvenModeClusterModeTagStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull value MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull value MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTROvenModeClusterModeOptionStruct : NSObject -@property (nonatomic, copy) NSString * _Nonnull label MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull label MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_NEWLY_AVAILABLE; @end MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -877,30 +877,30 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSArray * _Nonnull semanticTags MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRLaundryWasherModeClusterModeTagStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull value MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull value MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRLaundryWasherModeClusterModeOptionStruct : NSObject -@property (nonatomic, copy) NSString * _Nonnull label MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull label MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull value MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull value MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct : NSObject -@property (nonatomic, copy) NSString * _Nonnull label MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull label MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_NEWLY_AVAILABLE; @end MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @@ -929,25 +929,25 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRefrigeratorAlarmClusterNotifyEvent : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull active MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull inactive MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull state MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull mask MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull active MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull inactive MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull state MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull mask MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRDishwasherModeClusterModeTagStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull value MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull value MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRDishwasherModeClusterModeOptionStruct : NSObject -@property (nonatomic, copy) NSString * _Nonnull label MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull label MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_NEWLY_AVAILABLE; @end MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) @@ -999,25 +999,25 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) @interface MTRSmokeCOAlarmClusterAllClearEvent : NSObject @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRDishwasherAlarmClusterNotifyEvent : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull active MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull inactive MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull state MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull mask MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull active MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull inactive MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull state MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull mask MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRMicrowaveOvenModeClusterModeTagStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull value MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull value MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRMicrowaveOvenModeClusterModeOptionStruct : NSObject -@property (nonatomic, copy) NSString * _Nonnull label MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull label MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_NEWLY_AVAILABLE; @end MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 2d9b737038535e..5f6e87c76b7b03 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -43213,7 +43213,6 @@ class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute } }; -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster IcdManagement | 0x0046 | |------------------------------------------------------------------------------| @@ -43242,7 +43241,6 @@ class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* * Command RegisterClient */ @@ -43251,21 +43249,11 @@ class IcdManagementRegisterClient : public ClusterCommand { IcdManagementRegisterClient() : ClusterCommand("register-client") { -#if MTR_ENABLE_PROVISIONAL AddArgument("CheckInNodeID", 0, UINT64_MAX, &mRequest.checkInNodeID); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL AddArgument("MonitoredSubject", 0, UINT64_MAX, &mRequest.monitoredSubject); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL AddArgument("Key", &mRequest.key); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL AddArgument("VerificationKey", &mRequest.verificationKey); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL AddArgument("ClientType", 0, UINT8_MAX, &mRequest.clientType); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -43280,25 +43268,15 @@ class IcdManagementRegisterClient : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRICDManagementClusterRegisterClientParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL params.checkInNodeID = [NSNumber numberWithUnsignedLongLong:mRequest.checkInNodeID]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL params.monitoredSubject = [NSNumber numberWithUnsignedLongLong:mRequest.monitoredSubject]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL params.key = [NSData dataWithBytes:mRequest.key.data() length:mRequest.key.size()]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL if (mRequest.verificationKey.HasValue()) { params.verificationKey = [NSData dataWithBytes:mRequest.verificationKey.Value().data() length:mRequest.verificationKey.Value().size()]; } else { params.verificationKey = nil; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL params.clientType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.clientType)]; -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -43328,8 +43306,6 @@ class IcdManagementRegisterClient : public ClusterCommand { chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Command UnregisterClient */ @@ -43338,12 +43314,8 @@ class IcdManagementUnregisterClient : public ClusterCommand { IcdManagementUnregisterClient() : ClusterCommand("unregister-client") { -#if MTR_ENABLE_PROVISIONAL AddArgument("CheckInNodeID", 0, UINT64_MAX, &mRequest.checkInNodeID); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL AddArgument("VerificationKey", &mRequest.verificationKey); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -43358,16 +43330,12 @@ class IcdManagementUnregisterClient : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRICDManagementClusterUnregisterClientParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL params.checkInNodeID = [NSNumber numberWithUnsignedLongLong:mRequest.checkInNodeID]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL if (mRequest.verificationKey.HasValue()) { params.verificationKey = [NSData dataWithBytes:mRequest.verificationKey.Value().data() length:mRequest.verificationKey.Value().size()]; } else { params.verificationKey = nil; } -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -43391,8 +43359,6 @@ class IcdManagementUnregisterClient : public ClusterCommand { chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Command StayActiveRequest */ @@ -43401,9 +43367,7 @@ class IcdManagementStayActiveRequest : public ClusterCommand { IcdManagementStayActiveRequest() : ClusterCommand("stay-active-request") { -#if MTR_ENABLE_PROVISIONAL AddArgument("StayActiveDuration", 0, UINT32_MAX, &mRequest.stayActiveDuration); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -43418,9 +43382,7 @@ class IcdManagementStayActiveRequest : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRICDManagementClusterStayActiveRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL params.stayActiveDuration = [NSNumber numberWithUnsignedInt:mRequest.stayActiveDuration]; -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -43450,10 +43412,6 @@ class IcdManagementStayActiveRequest : public ClusterCommand { chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* * Attribute IdleModeDuration */ @@ -43536,9 +43494,6 @@ class SubscribeAttributeIcdManagementIdleModeDuration : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ActiveModeDuration */ @@ -43621,9 +43576,6 @@ class SubscribeAttributeIcdManagementActiveModeDuration : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ActiveModeThreshold */ @@ -43706,9 +43658,6 @@ class SubscribeAttributeIcdManagementActiveModeThreshold : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute RegisteredClients */ @@ -43795,9 +43744,6 @@ class SubscribeAttributeIcdManagementRegisteredClients : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ICDCounter */ @@ -43880,9 +43826,6 @@ class SubscribeAttributeIcdManagementICDCounter : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClientsSupportedPerFabric */ @@ -43965,9 +43908,6 @@ class SubscribeAttributeIcdManagementClientsSupportedPerFabric : public Subscrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute UserActiveModeTriggerHint */ @@ -44050,9 +43990,6 @@ class SubscribeAttributeIcdManagementUserActiveModeTriggerHint : public Subscrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute UserActiveModeTriggerInstruction */ @@ -44135,9 +44072,6 @@ class SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction : public S } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute OperatingMode */ @@ -44220,9 +44154,6 @@ class SubscribeAttributeIcdManagementOperatingMode : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute MaximumCheckInBackOff */ @@ -44305,9 +44236,6 @@ class SubscribeAttributeIcdManagementMaximumCheckInBackOff : public SubscribeAtt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -44390,9 +44318,6 @@ class SubscribeAttributeIcdManagementGeneratedCommandList : public SubscribeAttr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ @@ -44475,9 +44400,6 @@ class SubscribeAttributeIcdManagementAcceptedCommandList : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AttributeList */ @@ -44560,9 +44482,6 @@ class SubscribeAttributeIcdManagementAttributeList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ @@ -44645,9 +44564,6 @@ class SubscribeAttributeIcdManagementFeatureMap : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ @@ -44730,8 +44646,6 @@ class SubscribeAttributeIcdManagementClusterRevision : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster Timer | 0x0047 | @@ -45642,7 +45556,6 @@ class SubscribeAttributeTimerClusterRevision : public SubscribeAttribute { #endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster OvenCavityOperationalState | 0x0048 | |------------------------------------------------------------------------------| @@ -45670,59 +45583,6 @@ class SubscribeAttributeTimerClusterRevision : public SubscribeAttribute { | * OperationCompletion | 0x0001 | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL -/* - * Command Pause - */ -class OvenCavityOperationalStatePause : public ClusterCommand { -public: - OvenCavityOperationalStatePause() - : ClusterCommand("pause") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROvenCavityOperationalStateClusterPauseParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster pauseWithParams:params completion: - ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Command Stop */ @@ -45773,8 +45633,6 @@ class OvenCavityOperationalStateStop : public ClusterCommand { private: }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Command Start */ @@ -45825,62 +45683,6 @@ class OvenCavityOperationalStateStart : public ClusterCommand { private: }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command Resume - */ -class OvenCavityOperationalStateResume : public ClusterCommand { -public: - OvenCavityOperationalStateResume() - : ClusterCommand("resume") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROvenCavityOperationalStateClusterResumeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resumeWithParams:params completion: - ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* * Attribute PhaseList */ @@ -45963,9 +45765,6 @@ class SubscribeAttributeOvenCavityOperationalStatePhaseList : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute CurrentPhase */ @@ -46048,9 +45847,6 @@ class SubscribeAttributeOvenCavityOperationalStateCurrentPhase : public Subscrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute CountdownTime */ @@ -46133,9 +45929,6 @@ class SubscribeAttributeOvenCavityOperationalStateCountdownTime : public Subscri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute OperationalStateList */ @@ -46218,9 +46011,6 @@ class SubscribeAttributeOvenCavityOperationalStateOperationalStateList : public } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute OperationalState */ @@ -46303,9 +46093,6 @@ class SubscribeAttributeOvenCavityOperationalStateOperationalState : public Subs } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute OperationalError */ @@ -46388,9 +46175,6 @@ class SubscribeAttributeOvenCavityOperationalStateOperationalError : public Subs } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -46473,9 +46257,6 @@ class SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList : public } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ @@ -46558,9 +46339,6 @@ class SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList : public S } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AttributeList */ @@ -46643,9 +46421,6 @@ class SubscribeAttributeOvenCavityOperationalStateAttributeList : public Subscri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ @@ -46728,9 +46503,6 @@ class SubscribeAttributeOvenCavityOperationalStateFeatureMap : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ @@ -46813,9 +46585,6 @@ class SubscribeAttributeOvenCavityOperationalStateClusterRevision : public Subsc } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster OvenMode | 0x0049 | |------------------------------------------------------------------------------| @@ -46836,7 +46605,6 @@ class SubscribeAttributeOvenCavityOperationalStateClusterRevision : public Subsc | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* * Command ChangeToMode */ @@ -46845,9 +46613,7 @@ class OvenModeChangeToMode : public ClusterCommand { OvenModeChangeToMode() : ClusterCommand("change-to-mode") { -#if MTR_ENABLE_PROVISIONAL AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -46862,9 +46628,7 @@ class OvenModeChangeToMode : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTROvenModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -46894,10 +46658,6 @@ class OvenModeChangeToMode : public ClusterCommand { chip::app::Clusters::OvenMode::Commands::ChangeToMode::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* * Attribute SupportedModes */ @@ -46980,9 +46740,6 @@ class SubscribeAttributeOvenModeSupportedModes : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute CurrentMode */ @@ -47065,267 +46822,6 @@ class SubscribeAttributeOvenModeCurrentMode : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute StartUpMode - */ -class ReadOvenModeStartUpMode : public ReadAttribute { -public: - ReadOvenModeStartUpMode() - : ReadAttribute("start-up-mode") - { - } - - ~ReadOvenModeStartUpMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.StartUpMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OvenMode StartUpMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOvenModeStartUpMode : public WriteAttribute { -public: - WriteOvenModeStartUpMode() - : WriteAttribute("start-up-mode") - { - AddArgument("attr-name", "start-up-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOvenModeStartUpMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OvenMode StartUpMode write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeOvenModeStartUpMode : public SubscribeAttribute { -public: - SubscribeAttributeOvenModeStartUpMode() - : SubscribeAttribute("start-up-mode") - { - } - - ~SubscribeAttributeOvenModeStartUpMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeStartUpModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.StartUpMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute OnMode - */ -class ReadOvenModeOnMode : public ReadAttribute { -public: - ReadOvenModeOnMode() - : ReadAttribute("on-mode") - { - } - - ~ReadOvenModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.OnMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OvenMode OnMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOvenModeOnMode : public WriteAttribute { -public: - WriteOvenModeOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOvenModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OvenMode OnMode write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeOvenModeOnMode : public SubscribeAttribute { -public: - SubscribeAttributeOvenModeOnMode() - : SubscribeAttribute("on-mode") - { - } - - ~SubscribeAttributeOvenModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOnModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.OnMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -47408,9 +46904,6 @@ class SubscribeAttributeOvenModeGeneratedCommandList : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ @@ -47493,9 +46986,6 @@ class SubscribeAttributeOvenModeAcceptedCommandList : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AttributeList */ @@ -47578,9 +47068,6 @@ class SubscribeAttributeOvenModeAttributeList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ @@ -47663,9 +47150,6 @@ class SubscribeAttributeOvenModeFeatureMap : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ @@ -47748,8 +47232,6 @@ class SubscribeAttributeOvenModeClusterRevision : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster LaundryDryerControls | 0x004A | @@ -49467,7 +48949,6 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { } }; -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster LaundryWasherMode | 0x0051 | |------------------------------------------------------------------------------| @@ -49488,7 +48969,6 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* * Command ChangeToMode */ @@ -49497,9 +48977,7 @@ class LaundryWasherModeChangeToMode : public ClusterCommand { LaundryWasherModeChangeToMode() : ClusterCommand("change-to-mode") { -#if MTR_ENABLE_PROVISIONAL AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -49514,9 +48992,7 @@ class LaundryWasherModeChangeToMode : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRLaundryWasherModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -49546,10 +49022,6 @@ class LaundryWasherModeChangeToMode : public ClusterCommand { chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* * Attribute SupportedModes */ @@ -49632,9 +49104,6 @@ class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute CurrentMode */ @@ -49717,267 +49186,6 @@ class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute StartUpMode - */ -class ReadLaundryWasherModeStartUpMode : public ReadAttribute { -public: - ReadLaundryWasherModeStartUpMode() - : ReadAttribute("start-up-mode") - { - } - - ~ReadLaundryWasherModeStartUpMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("LaundryWasherMode StartUpMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteLaundryWasherModeStartUpMode : public WriteAttribute { -public: - WriteLaundryWasherModeStartUpMode() - : WriteAttribute("start-up-mode") - { - AddArgument("attr-name", "start-up-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteLaundryWasherModeStartUpMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LaundryWasherMode StartUpMode write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute { -public: - SubscribeAttributeLaundryWasherModeStartUpMode() - : SubscribeAttribute("start-up-mode") - { - } - - ~SubscribeAttributeLaundryWasherModeStartUpMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeStartUpModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute OnMode - */ -class ReadLaundryWasherModeOnMode : public ReadAttribute { -public: - ReadLaundryWasherModeOnMode() - : ReadAttribute("on-mode") - { - } - - ~ReadLaundryWasherModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("LaundryWasherMode OnMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteLaundryWasherModeOnMode : public WriteAttribute { -public: - WriteLaundryWasherModeOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteLaundryWasherModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LaundryWasherMode OnMode write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { -public: - SubscribeAttributeLaundryWasherModeOnMode() - : SubscribeAttribute("on-mode") - { - } - - ~SubscribeAttributeLaundryWasherModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOnModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -50060,9 +49268,6 @@ class SubscribeAttributeLaundryWasherModeGeneratedCommandList : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ @@ -50145,9 +49350,6 @@ class SubscribeAttributeLaundryWasherModeAcceptedCommandList : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AttributeList */ @@ -50230,9 +49432,6 @@ class SubscribeAttributeLaundryWasherModeAttributeList : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ @@ -50315,9 +49514,6 @@ class SubscribeAttributeLaundryWasherModeFeatureMap : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ @@ -50400,9 +49596,6 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | |------------------------------------------------------------------------------| @@ -50423,7 +49616,6 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* * Command ChangeToMode */ @@ -50432,9 +49624,7 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust RefrigeratorAndTemperatureControlledCabinetModeChangeToMode() : ClusterCommand("change-to-mode") { -#if MTR_ENABLE_PROVISIONAL AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -50449,9 +49639,7 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -50481,10 +49669,6 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* * Attribute SupportedModes */ @@ -50567,9 +49751,6 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupported } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute CurrentMode */ @@ -50652,267 +49833,6 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMo } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute StartUpMode - */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public ReadAttribute { -public: - ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - : ReadAttribute("start-up-mode") - { - } - - ~ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode StartUpMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public WriteAttribute { -public: - WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - : WriteAttribute("start-up-mode") - { - AddArgument("attr-name", "start-up-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode StartUpMode write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public SubscribeAttribute { -public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - : SubscribeAttribute("start-up-mode") - { - } - - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeStartUpModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute OnMode - */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode : public ReadAttribute { -public: - ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() - : ReadAttribute("on-mode") - { - } - - ~ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteAttribute { -public: - WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : public SubscribeAttribute { -public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() - : SubscribeAttribute("on-mode") - { - } - - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOnModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -50995,9 +49915,6 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGenerated } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ @@ -51080,9 +49997,6 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedC } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AttributeList */ @@ -51165,9 +50079,6 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ @@ -51250,9 +50161,6 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMa } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ @@ -51335,9 +50243,6 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRe } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster LaundryWasherControls | 0x0053 | |------------------------------------------------------------------------------| @@ -51357,8 +50262,6 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRe | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL - /* * Attribute SpinSpeeds */ @@ -51441,9 +50344,6 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeeds : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute SpinSpeedCurrent */ @@ -51570,9 +50470,6 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute NumberOfRinses */ @@ -51696,9 +50593,6 @@ class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute SupportedRinses */ @@ -51781,9 +50675,6 @@ class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -51866,9 +50757,6 @@ class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public Subsc } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ @@ -51951,9 +50839,6 @@ class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public Subscr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AttributeList */ @@ -52036,9 +50921,6 @@ class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAtt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ @@ -52121,9 +51003,6 @@ class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ @@ -52206,8 +51085,6 @@ class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster RvcRunMode | 0x0054 | |------------------------------------------------------------------------------| @@ -53498,7 +52375,6 @@ class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute } }; -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster TemperatureControl | 0x0056 | |------------------------------------------------------------------------------| @@ -53521,7 +52397,6 @@ class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* * Command SetTemperature */ @@ -53530,12 +52405,8 @@ class TemperatureControlSetTemperature : public ClusterCommand { TemperatureControlSetTemperature() : ClusterCommand("set-temperature") { -#if MTR_ENABLE_PROVISIONAL AddArgument("TargetTemperature", INT16_MIN, INT16_MAX, &mRequest.targetTemperature); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL AddArgument("TargetTemperatureLevel", 0, UINT8_MAX, &mRequest.targetTemperatureLevel); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -53550,20 +52421,16 @@ class TemperatureControlSetTemperature : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL if (mRequest.targetTemperature.HasValue()) { params.targetTemperature = [NSNumber numberWithShort:mRequest.targetTemperature.Value()]; } else { params.targetTemperature = nil; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL if (mRequest.targetTemperatureLevel.HasValue()) { params.targetTemperatureLevel = [NSNumber numberWithUnsignedChar:mRequest.targetTemperatureLevel.Value()]; } else { params.targetTemperatureLevel = nil; } -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -53587,10 +52454,6 @@ class TemperatureControlSetTemperature : public ClusterCommand { chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* * Attribute TemperatureSetpoint */ @@ -53673,9 +52536,6 @@ class SubscribeAttributeTemperatureControlTemperatureSetpoint : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute MinTemperature */ @@ -53758,9 +52618,6 @@ class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute MaxTemperature */ @@ -53843,9 +52700,6 @@ class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute Step */ @@ -53928,9 +52782,6 @@ class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute SelectedTemperatureLevel */ @@ -54013,9 +52864,6 @@ class SubscribeAttributeTemperatureControlSelectedTemperatureLevel : public Subs } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute SupportedTemperatureLevels */ @@ -54098,9 +52946,6 @@ class SubscribeAttributeTemperatureControlSupportedTemperatureLevels : public Su } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -54183,9 +53028,6 @@ class SubscribeAttributeTemperatureControlGeneratedCommandList : public Subscrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ @@ -54268,9 +53110,6 @@ class SubscribeAttributeTemperatureControlAcceptedCommandList : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AttributeList */ @@ -54353,9 +53192,6 @@ class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ @@ -54438,9 +53274,6 @@ class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ @@ -54523,9 +53356,6 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster RefrigeratorAlarm | 0x0057 | |------------------------------------------------------------------------------| @@ -54545,8 +53375,6 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr | * Notify | 0x0000 | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL - /* * Attribute Mask */ @@ -54629,9 +53457,6 @@ class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute State */ @@ -54714,9 +53539,6 @@ class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute Supported */ @@ -54799,9 +53621,6 @@ class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -54884,9 +53703,6 @@ class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ @@ -54969,9 +53785,6 @@ class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AttributeList */ @@ -55054,9 +53867,6 @@ class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ @@ -55139,9 +53949,6 @@ class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ @@ -55224,9 +54031,6 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster DishwasherMode | 0x0059 | |------------------------------------------------------------------------------| @@ -55247,7 +54051,6 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* * Command ChangeToMode */ @@ -55256,9 +54059,7 @@ class DishwasherModeChangeToMode : public ClusterCommand { DishwasherModeChangeToMode() : ClusterCommand("change-to-mode") { -#if MTR_ENABLE_PROVISIONAL AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -55273,9 +54074,7 @@ class DishwasherModeChangeToMode : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRDishwasherModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -55305,10 +54104,6 @@ class DishwasherModeChangeToMode : public ClusterCommand { chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* * Attribute SupportedModes */ @@ -55391,9 +54186,6 @@ class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute CurrentMode */ @@ -55476,267 +54268,6 @@ class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute StartUpMode - */ -class ReadDishwasherModeStartUpMode : public ReadAttribute { -public: - ReadDishwasherModeStartUpMode() - : ReadAttribute("start-up-mode") - { - } - - ~ReadDishwasherModeStartUpMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("DishwasherMode StartUpMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDishwasherModeStartUpMode : public WriteAttribute { -public: - WriteDishwasherModeStartUpMode() - : WriteAttribute("start-up-mode") - { - AddArgument("attr-name", "start-up-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDishwasherModeStartUpMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DishwasherMode StartUpMode write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { -public: - SubscribeAttributeDishwasherModeStartUpMode() - : SubscribeAttribute("start-up-mode") - { - } - - ~SubscribeAttributeDishwasherModeStartUpMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeStartUpModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute OnMode - */ -class ReadDishwasherModeOnMode : public ReadAttribute { -public: - ReadDishwasherModeOnMode() - : ReadAttribute("on-mode") - { - } - - ~ReadDishwasherModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.OnMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("DishwasherMode OnMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDishwasherModeOnMode : public WriteAttribute { -public: - WriteDishwasherModeOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDishwasherModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DishwasherMode OnMode write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { -public: - SubscribeAttributeDishwasherModeOnMode() - : SubscribeAttribute("on-mode") - { - } - - ~SubscribeAttributeDishwasherModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOnModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.OnMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -55819,9 +54350,6 @@ class SubscribeAttributeDishwasherModeGeneratedCommandList : public SubscribeAtt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ @@ -55904,9 +54432,6 @@ class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AttributeList */ @@ -55989,9 +54514,6 @@ class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ @@ -56074,9 +54596,6 @@ class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ @@ -56159,8 +54678,6 @@ class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster AirQuality | 0x005B | |------------------------------------------------------------------------------| @@ -58270,7 +56787,6 @@ class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute } }; -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster DishwasherAlarm | 0x005D | |------------------------------------------------------------------------------| @@ -58293,7 +56809,6 @@ class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute | * Notify | 0x0000 | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* * Command Reset */ @@ -58302,9 +56817,7 @@ class DishwasherAlarmReset : public ClusterCommand { DishwasherAlarmReset() : ClusterCommand("reset") { -#if MTR_ENABLE_PROVISIONAL AddArgument("Alarms", 0, UINT32_MAX, &mRequest.alarms); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -58319,9 +56832,7 @@ class DishwasherAlarmReset : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRDishwasherAlarmClusterResetParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL params.alarms = [NSNumber numberWithUnsignedInt:mRequest.alarms.Raw()]; -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -58345,8 +56856,6 @@ class DishwasherAlarmReset : public ClusterCommand { chip::app::Clusters::DishwasherAlarm::Commands::Reset::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Command ModifyEnabledAlarms */ @@ -58355,9 +56864,7 @@ class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand { DishwasherAlarmModifyEnabledAlarms() : ClusterCommand("modify-enabled-alarms") { -#if MTR_ENABLE_PROVISIONAL AddArgument("Mask", 0, UINT32_MAX, &mRequest.mask); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -58372,9 +56879,7 @@ class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL params.mask = [NSNumber numberWithUnsignedInt:mRequest.mask.Raw()]; -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -58398,10 +56903,6 @@ class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand { chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* * Attribute Mask */ @@ -58484,9 +56985,6 @@ class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute Latch */ @@ -58569,9 +57067,6 @@ class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute State */ @@ -58654,9 +57149,6 @@ class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute Supported */ @@ -58739,9 +57231,6 @@ class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -58824,9 +57313,6 @@ class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ @@ -58909,9 +57395,6 @@ class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAtt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AttributeList */ @@ -58994,9 +57477,6 @@ class SubscribeAttributeDishwasherAlarmAttributeList : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ @@ -59079,9 +57559,6 @@ class SubscribeAttributeDishwasherAlarmFeatureMap : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ @@ -59164,9 +57641,6 @@ class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster MicrowaveOvenMode | 0x005E | |------------------------------------------------------------------------------| @@ -59184,8 +57658,6 @@ class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribu | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL - /* * Attribute SupportedModes */ @@ -59268,9 +57740,6 @@ class SubscribeAttributeMicrowaveOvenModeSupportedModes : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute CurrentMode */ @@ -59353,9 +57822,6 @@ class SubscribeAttributeMicrowaveOvenModeCurrentMode : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -59438,9 +57904,6 @@ class SubscribeAttributeMicrowaveOvenModeGeneratedCommandList : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ @@ -59523,9 +57986,6 @@ class SubscribeAttributeMicrowaveOvenModeAcceptedCommandList : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AttributeList */ @@ -59608,9 +58068,6 @@ class SubscribeAttributeMicrowaveOvenModeAttributeList : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ @@ -59693,9 +58150,6 @@ class SubscribeAttributeMicrowaveOvenModeFeatureMap : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ @@ -59778,9 +58232,6 @@ class SubscribeAttributeMicrowaveOvenModeClusterRevision : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster MicrowaveOvenControl | 0x005F | |------------------------------------------------------------------------------| @@ -59807,7 +58258,6 @@ class SubscribeAttributeMicrowaveOvenModeClusterRevision : public SubscribeAttri | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* * Command SetCookingParameters */ @@ -59816,21 +58266,13 @@ class MicrowaveOvenControlSetCookingParameters : public ClusterCommand { MicrowaveOvenControlSetCookingParameters() : ClusterCommand("set-cooking-parameters") { -#if MTR_ENABLE_PROVISIONAL AddArgument("CookMode", 0, UINT8_MAX, &mRequest.cookMode); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL AddArgument("CookTime", 0, UINT32_MAX, &mRequest.cookTime); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL AddArgument("PowerSetting", 0, UINT8_MAX, &mRequest.powerSetting); -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL AddArgument("WattSettingIndex", 0, UINT8_MAX, &mRequest.wattSettingIndex); #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL AddArgument("StartAfterSetting", 0, 1, &mRequest.startAfterSetting); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -59845,27 +58287,21 @@ class MicrowaveOvenControlSetCookingParameters : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL if (mRequest.cookMode.HasValue()) { params.cookMode = [NSNumber numberWithUnsignedChar:mRequest.cookMode.Value()]; } else { params.cookMode = nil; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL if (mRequest.cookTime.HasValue()) { params.cookTime = [NSNumber numberWithUnsignedInt:mRequest.cookTime.Value()]; } else { params.cookTime = nil; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL if (mRequest.powerSetting.HasValue()) { params.powerSetting = [NSNumber numberWithUnsignedChar:mRequest.powerSetting.Value()]; } else { params.powerSetting = nil; } -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL if (mRequest.wattSettingIndex.HasValue()) { params.wattSettingIndex = [NSNumber numberWithUnsignedChar:mRequest.wattSettingIndex.Value()]; @@ -59873,13 +58309,11 @@ class MicrowaveOvenControlSetCookingParameters : public ClusterCommand { params.wattSettingIndex = nil; } #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL if (mRequest.startAfterSetting.HasValue()) { params.startAfterSetting = [NSNumber numberWithBool:mRequest.startAfterSetting.Value()]; } else { params.startAfterSetting = nil; } -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -59903,8 +58337,6 @@ class MicrowaveOvenControlSetCookingParameters : public ClusterCommand { chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Command AddMoreTime */ @@ -59913,9 +58345,7 @@ class MicrowaveOvenControlAddMoreTime : public ClusterCommand { MicrowaveOvenControlAddMoreTime() : ClusterCommand("add-more-time") { -#if MTR_ENABLE_PROVISIONAL AddArgument("TimeToAdd", 0, UINT32_MAX, &mRequest.timeToAdd); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -59930,9 +58360,7 @@ class MicrowaveOvenControlAddMoreTime : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL params.timeToAdd = [NSNumber numberWithUnsignedInt:mRequest.timeToAdd]; -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -59956,10 +58384,6 @@ class MicrowaveOvenControlAddMoreTime : public ClusterCommand { chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* * Attribute CookTime */ @@ -60042,9 +58466,6 @@ class SubscribeAttributeMicrowaveOvenControlCookTime : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute MaxCookTime */ @@ -60127,9 +58548,6 @@ class SubscribeAttributeMicrowaveOvenControlMaxCookTime : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute PowerSetting */ @@ -60212,9 +58630,6 @@ class SubscribeAttributeMicrowaveOvenControlPowerSetting : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute MinPower */ @@ -60297,9 +58712,6 @@ class SubscribeAttributeMicrowaveOvenControlMinPower : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute MaxPower */ @@ -60382,9 +58794,6 @@ class SubscribeAttributeMicrowaveOvenControlMaxPower : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute PowerStep */ @@ -60467,7 +58876,6 @@ class SubscribeAttributeMicrowaveOvenControlPowerStep : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* @@ -60638,7 +59046,6 @@ class SubscribeAttributeMicrowaveOvenControlSelectedWattIndex : public Subscribe }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute WattRating @@ -60722,9 +59129,6 @@ class SubscribeAttributeMicrowaveOvenControlWattRating : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -60807,9 +59211,6 @@ class SubscribeAttributeMicrowaveOvenControlGeneratedCommandList : public Subscr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ @@ -60892,9 +59293,6 @@ class SubscribeAttributeMicrowaveOvenControlAcceptedCommandList : public Subscri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AttributeList */ @@ -60977,9 +59375,6 @@ class SubscribeAttributeMicrowaveOvenControlAttributeList : public SubscribeAttr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ @@ -61062,9 +59457,6 @@ class SubscribeAttributeMicrowaveOvenControlFeatureMap : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ @@ -61147,8 +59539,6 @@ class SubscribeAttributeMicrowaveOvenControlClusterRevision : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster OperationalState | 0x0060 | |------------------------------------------------------------------------------| @@ -62404,7 +60794,6 @@ class RvcOperationalStateResume : public ClusterCommand { private: }; -#if MTR_ENABLE_PROVISIONAL /* * Command GoHome */ @@ -62455,8 +60844,6 @@ class RvcOperationalStateGoHome : public ClusterCommand { private: }; -#endif // MTR_ENABLE_PROVISIONAL - /* * Attribute PhaseList */ @@ -85165,7 +83552,6 @@ class DoorLockClearCredential : public ClusterCommand { TypedComplexArgument> mComplex_Credential; }; -#if MTR_ENABLE_PROVISIONAL /* * Command UnboltDoor */ @@ -85174,9 +83560,7 @@ class DoorLockUnboltDoor : public ClusterCommand { DoorLockUnboltDoor() : ClusterCommand("unbolt-door") { -#if MTR_ENABLE_PROVISIONAL AddArgument("PINCode", &mRequest.PINCode); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -85191,13 +83575,11 @@ class DoorLockUnboltDoor : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL if (mRequest.PINCode.HasValue()) { params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; } else { params.pinCode = nil; } -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -85221,7 +83603,6 @@ class DoorLockUnboltDoor : public ClusterCommand { chip::app::Clusters::DoorLock::Commands::UnboltDoor::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Command SetAliroReaderConfig @@ -176319,89 +174700,51 @@ void registerClusterBooleanState(Commands & commands) } void registerClusterIcdManagement(Commands & commands) { -#if MTR_ENABLE_PROVISIONAL using namespace chip::app::Clusters::IcdManagement; const char * clusterName = "IcdManagement"; commands_list clusterCommands = { make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL }; commands.RegisterCluster(clusterName, clusterCommands); -#endif // MTR_ENABLE_PROVISIONAL } void registerClusterTimer(Commands & commands) { @@ -176466,136 +174809,74 @@ void registerClusterTimer(Commands & commands) } void registerClusterOvenCavityOperationalState(Commands & commands) { -#if MTR_ENABLE_PROVISIONAL using namespace chip::app::Clusters::OvenCavityOperationalState; const char * clusterName = "OvenCavityOperationalState"; commands_list clusterCommands = { make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // }; commands.RegisterCluster(clusterName, clusterCommands); -#endif // MTR_ENABLE_PROVISIONAL } void registerClusterOvenMode(Commands & commands) { -#if MTR_ENABLE_PROVISIONAL using namespace chip::app::Clusters::OvenMode; const char * clusterName = "OvenMode"; commands_list clusterCommands = { make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL }; commands.RegisterCluster(clusterName, clusterCommands); -#endif // MTR_ENABLE_PROVISIONAL } void registerClusterLaundryDryerControls(Commands & commands) { @@ -176685,123 +174966,66 @@ void registerClusterModeSelect(Commands & commands) } void registerClusterLaundryWasherMode(Commands & commands) { -#if MTR_ENABLE_PROVISIONAL using namespace chip::app::Clusters::LaundryWasherMode; const char * clusterName = "LaundryWasherMode"; commands_list clusterCommands = { make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL }; commands.RegisterCluster(clusterName, clusterCommands); -#endif // MTR_ENABLE_PROVISIONAL } void registerClusterRefrigeratorAndTemperatureControlledCabinetMode(Commands & commands) { -#if MTR_ENABLE_PROVISIONAL using namespace chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode; const char * clusterName = "RefrigeratorAndTemperatureControlledCabinetMode"; commands_list clusterCommands = { make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL }; commands.RegisterCluster(clusterName, clusterCommands); -#endif // MTR_ENABLE_PROVISIONAL } void registerClusterLaundryWasherControls(Commands & commands) { -#if MTR_ENABLE_PROVISIONAL using namespace chip::app::Clusters::LaundryWasherControls; const char * clusterName = "LaundryWasherControls"; @@ -176811,48 +175035,29 @@ void registerClusterLaundryWasherControls(Commands & commands) make_unique(Id), // make_unique(Id), // make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL }; commands.RegisterCluster(clusterName, clusterCommands); -#endif // MTR_ENABLE_PROVISIONAL } void registerClusterRvcRunMode(Commands & commands) { @@ -176916,71 +175121,44 @@ void registerClusterRvcCleanMode(Commands & commands) } void registerClusterTemperatureControl(Commands & commands) { -#if MTR_ENABLE_PROVISIONAL using namespace chip::app::Clusters::TemperatureControl; const char * clusterName = "TemperatureControl"; commands_list clusterCommands = { make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL }; commands.RegisterCluster(clusterName, clusterCommands); -#endif // MTR_ENABLE_PROVISIONAL } void registerClusterRefrigeratorAlarm(Commands & commands) { -#if MTR_ENABLE_PROVISIONAL using namespace chip::app::Clusters::RefrigeratorAlarm; const char * clusterName = "RefrigeratorAlarm"; @@ -176990,102 +175168,57 @@ void registerClusterRefrigeratorAlarm(Commands & commands) make_unique(Id), // make_unique(Id), // make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // }; commands.RegisterCluster(clusterName, clusterCommands); -#endif // MTR_ENABLE_PROVISIONAL } void registerClusterDishwasherMode(Commands & commands) { -#if MTR_ENABLE_PROVISIONAL using namespace chip::app::Clusters::DishwasherMode; const char * clusterName = "DishwasherMode"; commands_list clusterCommands = { make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL }; commands.RegisterCluster(clusterName, clusterCommands); -#endif // MTR_ENABLE_PROVISIONAL } void registerClusterAirQuality(Commands & commands) { @@ -177171,68 +175304,43 @@ void registerClusterSmokeCoAlarm(Commands & commands) } void registerClusterDishwasherAlarm(Commands & commands) { -#if MTR_ENABLE_PROVISIONAL using namespace chip::app::Clusters::DishwasherAlarm; const char * clusterName = "DishwasherAlarm"; commands_list clusterCommands = { make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // }; commands.RegisterCluster(clusterName, clusterCommands); -#endif // MTR_ENABLE_PROVISIONAL } void registerClusterMicrowaveOvenMode(Commands & commands) { -#if MTR_ENABLE_PROVISIONAL using namespace chip::app::Clusters::MicrowaveOvenMode; const char * clusterName = "MicrowaveOvenMode"; @@ -177242,81 +175350,49 @@ void registerClusterMicrowaveOvenMode(Commands & commands) make_unique(Id), // make_unique(Id), // make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL }; commands.RegisterCluster(clusterName, clusterCommands); -#endif // MTR_ENABLE_PROVISIONAL } void registerClusterMicrowaveOvenControl(Commands & commands) { -#if MTR_ENABLE_PROVISIONAL using namespace chip::app::Clusters::MicrowaveOvenControl; const char * clusterName = "MicrowaveOvenControl"; commands_list clusterCommands = { make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // @@ -177325,34 +175401,21 @@ void registerClusterMicrowaveOvenControl(Commands & commands) make_unique(), // make_unique(), // #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL }; commands.RegisterCluster(clusterName, clusterCommands); -#endif // MTR_ENABLE_PROVISIONAL } void registerClusterOperationalState(Commands & commands) { @@ -177407,9 +175470,7 @@ void registerClusterRvcOperationalState(Commands & commands) make_unique(Id), // make_unique(), // make_unique(), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // @@ -178529,9 +176590,7 @@ void registerClusterDoorLock(Commands & commands) make_unique(), // make_unique(), // make_unique(), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // #endif // MTR_ENABLE_PROVISIONAL From b8628ca735ce8d72af42d08abbc843a1565eb25b Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Wed, 11 Dec 2024 09:17:40 -0800 Subject: [PATCH 26/72] [Fabric-Admin] Reset PairingManager state before next command (#36795) * [Fabric-Admin] Reset PairingManager state before next command * Restyled by whitespace --------- Co-authored-by: Restyled.io --- .../fabric-sync/FabricSyncCommand.cpp | 6 ++++ .../device_manager/PairingManager.cpp | 31 +++++++++++++++++++ .../device_manager/PairingManager.h | 6 ++++ 3 files changed, 43 insertions(+) diff --git a/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp b/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp index 59405786a8091f..2cb7ce8f80c878 100644 --- a/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp +++ b/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp @@ -83,6 +83,7 @@ void FabricSyncAddBridgeCommand::OnCommissioningComplete(NodeId deviceId, CHIP_E ChipLogValueX64(deviceId), err.Format()); } + PairingManager::Instance().ResetForNextCommand(); mBridgeNodeId = kUndefinedNodeId; } @@ -123,6 +124,7 @@ void FabricSyncRemoveBridgeCommand::OnDeviceRemoved(NodeId deviceId, CHIP_ERROR ChipLogValueX64(deviceId), err.Format()); } + PairingManager::Instance().ResetForNextCommand(); mBridgeNodeId = kUndefinedNodeId; } @@ -174,6 +176,7 @@ void FabricSyncAddLocalBridgeCommand::OnCommissioningComplete(NodeId deviceId, C ChipLogValueX64(deviceId), err.Format()); } + PairingManager::Instance().ResetForNextCommand(); mLocalBridgeNodeId = kUndefinedNodeId; } @@ -215,6 +218,7 @@ void FabricSyncRemoveLocalBridgeCommand::OnDeviceRemoved(NodeId deviceId, CHIP_E ChipLogValueX64(deviceId), err.Format()); } + PairingManager::Instance().ResetForNextCommand(); mLocalBridgeNodeId = kUndefinedNodeId; } @@ -290,6 +294,8 @@ void FabricSyncDeviceCommand::OnCommissioningComplete(NodeId deviceId, CHIP_ERRO ChipLogError(NotSpecified, "Failed to pair synced device (0x:" ChipLogFormatX64 ") with error: %" CHIP_ERROR_FORMAT, ChipLogValueX64(deviceId), err.Format()); } + + PairingManager::Instance().ResetForNextCommand(); } CHIP_ERROR FabricSyncDeviceCommand::RunCommand(EndpointId remoteEndpointId) diff --git a/examples/fabric-admin/device_manager/PairingManager.cpp b/examples/fabric-admin/device_manager/PairingManager.cpp index 8d985ac553f010..1fffbd21ac7b4d 100644 --- a/examples/fabric-admin/device_manager/PairingManager.cpp +++ b/examples/fabric-admin/device_manager/PairingManager.cpp @@ -661,4 +661,35 @@ CHIP_ERROR PairingManager::UnpairDevice(NodeId nodeId) }); } +void PairingManager::ResetForNextCommand() +{ + mCommissioningWindowDelegate = nullptr; + mPairingDelegate = nullptr; + mNodeId = chip::kUndefinedNodeId; + mVerifier = chip::ByteSpan(); + mSalt = chip::ByteSpan(); + mDiscriminator = 0; + mSetupPINCode = 0; + mDeviceIsICD = false; + + memset(mRandomGeneratedICDSymmetricKey, 0, sizeof(mRandomGeneratedICDSymmetricKey)); + memset(mVerifierBuffer, 0, sizeof(mVerifierBuffer)); + memset(mSaltBuffer, 0, sizeof(mSaltBuffer)); + memset(mRemoteIpAddr, 0, sizeof(mRemoteIpAddr)); + memset(mOnboardingPayload, 0, sizeof(mOnboardingPayload)); + + mICDRegistration.ClearValue(); + mICDCheckInNodeId.ClearValue(); + mICDClientType.ClearValue(); + mICDSymmetricKey.ClearValue(); + mICDMonitoredSubject.ClearValue(); + mICDStayActiveDurationMsec.ClearValue(); + + mWindowOpener.reset(); + mOnOpenCommissioningWindowCallback.Cancel(); + mOnOpenCommissioningWindowVerifierCallback.Cancel(); + mCurrentFabricRemover.reset(); + mCurrentFabricRemoveCallback.Cancel(); +} + } // namespace admin diff --git a/examples/fabric-admin/device_manager/PairingManager.h b/examples/fabric-admin/device_manager/PairingManager.h index 77cec24876e9f2..81cb641fad46a5 100644 --- a/examples/fabric-admin/device_manager/PairingManager.h +++ b/examples/fabric-admin/device_manager/PairingManager.h @@ -134,6 +134,12 @@ class PairingManager : public chip::Controller::DevicePairingDelegate, */ CHIP_ERROR UnpairDevice(chip::NodeId nodeId); + /** + * Resets the PairingManager's internal state to a baseline, making it ready to handle a new command. + * This method clears all internal states and resets all members to their initial values. + */ + void ResetForNextCommand(); + private: // Constructors PairingManager(); From 41a9dea02eff2b8e5603a86c6d2b2026d2cfd1e4 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Wed, 11 Dec 2024 19:53:27 +0100 Subject: [PATCH 27/72] [Fabric-Sync] Fix subscription for non-ICD devices (#36799) --- examples/fabric-sync/admin/DeviceSynchronization.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/fabric-sync/admin/DeviceSynchronization.cpp b/examples/fabric-sync/admin/DeviceSynchronization.cpp index 527ccfa631295a..fea80780d5bb24 100644 --- a/examples/fabric-sync/admin/DeviceSynchronization.cpp +++ b/examples/fabric-sync/admin/DeviceSynchronization.cpp @@ -274,7 +274,7 @@ void DeviceSynchronizer::SynchronizationCompleteAddDevice() bridge::FabricBridge::Instance().AddSynchronizedDevice(mCurrentDeviceData); // TODO(#35077) Figure out how we should reflect CADMIN values of ICD. - if (!mCurrentDeviceData.isIcd) + if (!mCurrentDeviceData.isIcd.value_or(false)) { VerifyOrDie(mController); ScopedNodeId scopedNodeId(mNodeId, mController->GetFabricIndex()); From 572a799c2acc2cea5fdaf175ee323aa405a9f7c2 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 11 Dec 2024 16:47:39 -0500 Subject: [PATCH 28/72] Update Darwin availability annotations. (#36807) --- .../Framework/CHIP/MTRAttributeValueWaiter.h | 2 +- src/darwin/Framework/CHIP/MTRDevice.h | 4 +- src/darwin/Framework/CHIP/MTRKeypair.h | 5 +- .../CHIP/templates/availability.yaml | 11 +- .../CHIP/zap-generated/MTRBaseClusters.h | 920 +++++++++--------- .../CHIP/zap-generated/MTRClusterConstants.h | 298 +++--- .../CHIP/zap-generated/MTRClusters.h | 320 +++--- .../zap-generated/MTRCommandPayloadsObjc.h | 126 +-- .../CHIP/zap-generated/MTRStructsObjc.h | 126 +-- 9 files changed, 910 insertions(+), 902 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRAttributeValueWaiter.h b/src/darwin/Framework/CHIP/MTRAttributeValueWaiter.h index d1f40910f56025..4e2fe9794b5bee 100644 --- a/src/darwin/Framework/CHIP/MTRAttributeValueWaiter.h +++ b/src/darwin/Framework/CHIP/MTRAttributeValueWaiter.h @@ -31,7 +31,7 @@ MTR_AVAILABLE(ios(18.3), macos(15.3), watchos(11.3), tvos(18.3)) */ - (void)cancel; -@property (readonly, nonatomic) NSUUID * UUID MTR_NEWLY_AVAILABLE; +@property (readonly, nonatomic) NSUUID * UUID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end diff --git a/src/darwin/Framework/CHIP/MTRDevice.h b/src/darwin/Framework/CHIP/MTRDevice.h index ae355605626ad9..1f5e9c9a075981 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.h +++ b/src/darwin/Framework/CHIP/MTRDevice.h @@ -126,7 +126,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) /** * Network commissioning features supported by the device. */ -@property (nonatomic, readonly) MTRNetworkCommissioningFeature networkCommissioningFeatures MTR_NEWLY_AVAILABLE; +@property (nonatomic, readonly) MTRNetworkCommissioningFeature networkCommissioningFeatures MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Set the delegate to receive asynchronous callbacks about the device. @@ -228,7 +228,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * data-values (as described in the documentation for * MTRDeviceResponseHandler) as values. */ -- (NSDictionary *> *)descriptorClusters MTR_NEWLY_AVAILABLE; +- (NSDictionary *> *)descriptorClusters MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Invoke a command with a designated command path diff --git a/src/darwin/Framework/CHIP/MTRKeypair.h b/src/darwin/Framework/CHIP/MTRKeypair.h index bf664e13aa6385..c270aed0878d1f 100644 --- a/src/darwin/Framework/CHIP/MTRKeypair.h +++ b/src/darwin/Framework/CHIP/MTRKeypair.h @@ -31,18 +31,19 @@ NS_ASSUME_NONNULL_BEGIN * Implementations of the keypair methods must not call into any Matter * framework APIs. */ +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @protocol MTRKeypair @optional /** * @brief Returns a copy of the public key for the keypair. */ -- (SecKeyRef)copyPublicKey MTR_NEWLY_AVAILABLE; +- (SecKeyRef)copyPublicKey MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * @brief Returns public key for the keypair without adding a reference. DEPRECATED - please use copyPublicKey, otherwise this will leak. */ -- (SecKeyRef)publicKey MTR_NEWLY_DEPRECATED("Please implement copyPublicKey, this will leak otherwise"); +- (SecKeyRef)publicKey MTR_DEPRECATED("Please implement copyPublicKey, this will leak otherwise", ios(16.1, 18.4), macos(13.0, 15.4), watchos(9.1, 11.4), tvos(16.1, 18.4)); /** * @brief A function to sign a message using ECDSA diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 0b43860b3d4696..3885ae5d988a1d 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -10008,8 +10008,12 @@ - XY - ColorTemperature -- release: "Future" - versions: "future" +- release: "8377F965-9A14-4120-AAC4-4F296BA64949" + versions: + iOS: "18.4" + macOS: "15.4" + watchOS: "11.4" + tvOS: "18.4" introduced: clusters: - DishwasherAlarm @@ -10632,3 +10636,6 @@ # The one bit in this bitmap is marked X in the spec, but we can't have # an empty bitmap. - Feature + +- release: "Future" + versions: "future" diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 1bd5e921d5e5da..cf7924b9b5d70d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -4133,7 +4133,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * * Allows servers to ensure that listed clients are notified when a server is available for communication. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRBaseClusterICDManagement : MTRGenericBaseCluster /** @@ -4141,109 +4141,109 @@ MTR_NEWLY_AVAILABLE * * Register a client to the end device */ -- (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *)params completion:(void (^)(MTRICDManagementClusterRegisterClientResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *)params completion:(void (^)(MTRICDManagementClusterRegisterClientResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Command UnregisterClient * * Unregister a client from an end device */ -- (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParams *)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParams *)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Command StayActiveRequest * * Request the end device to stay in Active Mode for an additional ActiveModeThreshold */ -- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams *)params completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams *)params completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeIdleModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeIdleModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeIdleModeDurationWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeIdleModeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeIdleModeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeActiveModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeActiveModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeActiveModeDurationWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeActiveModeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeActiveModeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeActiveModeThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeActiveModeThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeActiveModeThresholdWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeActiveModeThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeActiveModeThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeRegisteredClientsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeRegisteredClientsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeRegisteredClientsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeICDCounterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeICDCounterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeICDCounterWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeICDCounterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeICDCounterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeClientsSupportedPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeClientsSupportedPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeClientsSupportedPerFabricWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeClientsSupportedPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeClientsSupportedPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeUserActiveModeTriggerHintWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeUserActiveModeTriggerHintWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeUserActiveModeTriggerHintWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeUserActiveModeTriggerHintWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeUserActiveModeTriggerHintWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeUserActiveModeTriggerInstructionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeUserActiveModeTriggerInstructionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeUserActiveModeTriggerInstructionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeUserActiveModeTriggerInstructionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeUserActiveModeTriggerInstructionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeMaximumCheckInBackOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeMaximumCheckInBackOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeMaximumCheckInBackOffWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMaximumCheckInBackOffWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeMaximumCheckInBackOffWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.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(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -4258,7 +4258,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -4367,7 +4367,7 @@ MTR_PROVISIONALLY_AVAILABLE * * This cluster supports remotely monitoring and, where supported, changing the operational state of an Oven. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRBaseClusterOvenCavityOperationalState : MTRGenericBaseCluster /** @@ -4375,83 +4375,83 @@ MTR_NEWLY_AVAILABLE * * Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ -- (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)stopWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Command Start * * 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. */ -- (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)startWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.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(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -4466,7 +4466,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -4475,7 +4475,7 @@ MTR_NEWLY_AVAILABLE * * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRBaseClusterOvenMode : MTRGenericBaseCluster /** @@ -4484,49 +4484,49 @@ MTR_NEWLY_AVAILABLE * This command is used to change device modes. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ -- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.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(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -4541,7 +4541,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -4722,7 +4722,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRBaseClusterLaundryWasherMode : MTRGenericBaseCluster /** @@ -4731,49 +4731,49 @@ MTR_NEWLY_AVAILABLE * This command is used to change device modes. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ -- (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *)params completion:(void (^)(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *)params completion:(void (^)(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.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(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -4788,7 +4788,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -4797,7 +4797,7 @@ MTR_NEWLY_AVAILABLE * * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode : MTRGenericBaseCluster /** @@ -4806,49 +4806,49 @@ MTR_NEWLY_AVAILABLE * This command is used to change device modes. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ -- (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams *)params completion:(void (^)(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams *)params completion:(void (^)(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.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(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -4863,7 +4863,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -4872,66 +4872,66 @@ MTR_NEWLY_AVAILABLE * * This cluster supports remotely monitoring and controlling the different types of functionality available to a washing device, such as a washing machine. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRBaseClusterLaundryWasherControls : MTRGenericBaseCluster -- (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeNumberOfRinsesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeNumberOfRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeNumberOfRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeSupportedRinsesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeSupportedRinsesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSupportedRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeSupportedRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.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(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -4946,7 +4946,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -5105,7 +5105,7 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) * * Attributes and commands for configuring the temperature control, and reporting temperature. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRBaseClusterTemperatureControl : MTRGenericBaseCluster /** @@ -5113,75 +5113,75 @@ MTR_NEWLY_AVAILABLE * * Set Temperature */ -- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)setTemperatureWithCompletion:(MTRStatusCompletion)completion - MTR_NEWLY_AVAILABLE; + MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeTemperatureSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeTemperatureSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeTemperatureSetpointWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeTemperatureSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeTemperatureSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeMinTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeMinTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeMinTemperatureWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMinTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeMinTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeMaxTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeMaxTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeMaxTemperatureWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMaxTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeMaxTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeStepWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSelectedTemperatureLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeSelectedTemperatureLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeSupportedTemperatureLevelsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeSupportedTemperatureLevelsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeSupportedTemperatureLevelsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSupportedTemperatureLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeSupportedTemperatureLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.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(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -5196,7 +5196,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -5205,56 +5205,56 @@ MTR_NEWLY_AVAILABLE * * Attributes and commands for configuring the Refrigerator alarm. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRBaseClusterRefrigeratorAlarm : MTRGenericBaseCluster -- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.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(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -5269,7 +5269,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -5278,7 +5278,7 @@ MTR_NEWLY_AVAILABLE * * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRBaseClusterDishwasherMode : MTRGenericBaseCluster /** @@ -5287,49 +5287,49 @@ MTR_NEWLY_AVAILABLE * This command is used to change device modes. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ -- (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)params completion:(void (^)(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)params completion:(void (^)(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.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(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -5344,7 +5344,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -5558,7 +5558,7 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) * * Attributes and commands for configuring the Dishwasher alarm. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRBaseClusterDishwasherAlarm : MTRGenericBaseCluster /** @@ -5566,67 +5566,67 @@ MTR_NEWLY_AVAILABLE * * Reset alarm */ -- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Command ModifyEnabledAlarms * * Modify enabled alarms */ -- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeLatchWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeLatchWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeLatchWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeLatchWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeLatchWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.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(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -5641,7 +5641,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -5650,50 +5650,50 @@ MTR_NEWLY_AVAILABLE * * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRBaseClusterMicrowaveOvenMode : MTRGenericBaseCluster -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.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(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -5708,7 +5708,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -5717,7 +5717,7 @@ MTR_NEWLY_AVAILABLE * * Attributes and commands for configuring the microwave oven control, and reporting cooking stats. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRBaseClusterMicrowaveOvenControl : MTRGenericBaseCluster /** @@ -5725,51 +5725,51 @@ MTR_NEWLY_AVAILABLE * * Set Cooking Parameters */ -- (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCookingParametersParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCookingParametersParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)setCookingParametersWithCompletion:(MTRStatusCompletion)completion - MTR_NEWLY_AVAILABLE; + MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Command AddMoreTime * * Add More Cooking Time */ -- (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams *)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams *)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeCookTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeCookTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeCookTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeMaxCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeMaxCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeMaxCookTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMaxCookTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeMaxCookTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributePowerSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributePowerSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributePowerSettingWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributePowerSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributePowerSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeMinPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeMinPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeMinPowerWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMinPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeMinPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeMaxPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeMaxPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeMaxPowerWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMaxPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeMaxPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributePowerStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributePowerStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributePowerStepWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributePowerStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributePowerStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)readAttributeSupportedWattsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeSupportedWattsWithParams:(MTRSubscribeParams *)params @@ -5783,41 +5783,41 @@ MTR_NEWLY_AVAILABLE reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeSelectedWattIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeWattRatingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeWattRatingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeWattRatingWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeWattRatingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeWattRatingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.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(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -5832,7 +5832,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -5989,9 +5989,9 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) * * On receipt of this command, the device SHALL start seeking the charging dock, if possible in the current state of the device. */ -- (void)goHomeWithParams:(MTRRVCOperationalStateClusterGoHomeParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)goHomeWithParams:(MTRRVCOperationalStateClusterGoHomeParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)goHomeWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams *)params @@ -8159,9 +8159,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * * This command causes the lock device to unlock the door without pulling the latch. */ -- (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)unboltDoorWithCompletion:(MTRStatusCompletion)completion - MTR_NEWLY_AVAILABLE; + MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Command SetAliroReaderConfig * @@ -17190,41 +17190,41 @@ typedef NS_OPTIONS(uint32_t, MTRGroupKeyManagementFeature) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRICDManagementClientType) { - MTRICDManagementClientTypePermanent MTR_NEWLY_AVAILABLE = 0x00, - MTRICDManagementClientTypeEphemeral MTR_NEWLY_AVAILABLE = 0x01, -} MTR_NEWLY_AVAILABLE; + MTRICDManagementClientTypePermanent MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00, + MTRICDManagementClientTypeEphemeral MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x01, +} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_ENUM(uint8_t, MTRICDManagementOperatingMode) { - MTRICDManagementOperatingModeSIT MTR_NEWLY_AVAILABLE = 0x00, - MTRICDManagementOperatingModeLIT MTR_NEWLY_AVAILABLE = 0x01, -} MTR_NEWLY_AVAILABLE; + MTRICDManagementOperatingModeSIT MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00, + MTRICDManagementOperatingModeLIT MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x01, +} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_OPTIONS(uint32_t, MTRICDManagementFeature) { - MTRICDManagementFeatureCheckInProtocolSupport MTR_NEWLY_AVAILABLE = 0x1, - MTRICDManagementFeatureUserActiveModeTrigger MTR_NEWLY_AVAILABLE = 0x2, - MTRICDManagementFeatureLongIdleTimeSupport MTR_NEWLY_AVAILABLE = 0x4, - MTRICDManagementFeatureDynamicSitLitSupport MTR_NEWLY_AVAILABLE = 0x8, -} MTR_NEWLY_AVAILABLE; + MTRICDManagementFeatureCheckInProtocolSupport MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x1, + MTRICDManagementFeatureUserActiveModeTrigger MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x2, + MTRICDManagementFeatureLongIdleTimeSupport MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4, + MTRICDManagementFeatureDynamicSitLitSupport MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x8, +} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_OPTIONS(uint32_t, MTRICDManagementUserActiveModeTriggerBitmap) { - MTRICDManagementUserActiveModeTriggerBitmapPowerCycle MTR_NEWLY_AVAILABLE = 0x1, - MTRICDManagementUserActiveModeTriggerBitmapSettingsMenu MTR_NEWLY_AVAILABLE = 0x2, - MTRICDManagementUserActiveModeTriggerBitmapCustomInstruction MTR_NEWLY_AVAILABLE = 0x4, - MTRICDManagementUserActiveModeTriggerBitmapDeviceManual MTR_NEWLY_AVAILABLE = 0x8, - MTRICDManagementUserActiveModeTriggerBitmapActuateSensor MTR_NEWLY_AVAILABLE = 0x10, - MTRICDManagementUserActiveModeTriggerBitmapActuateSensorSeconds MTR_NEWLY_AVAILABLE = 0x20, - MTRICDManagementUserActiveModeTriggerBitmapActuateSensorTimes MTR_NEWLY_AVAILABLE = 0x40, - MTRICDManagementUserActiveModeTriggerBitmapActuateSensorLightsBlink MTR_NEWLY_AVAILABLE = 0x80, - MTRICDManagementUserActiveModeTriggerBitmapResetButton MTR_NEWLY_AVAILABLE = 0x100, - MTRICDManagementUserActiveModeTriggerBitmapResetButtonLightsBlink MTR_NEWLY_AVAILABLE = 0x200, - MTRICDManagementUserActiveModeTriggerBitmapResetButtonSeconds MTR_NEWLY_AVAILABLE = 0x400, - MTRICDManagementUserActiveModeTriggerBitmapResetButtonTimes MTR_NEWLY_AVAILABLE = 0x800, - MTRICDManagementUserActiveModeTriggerBitmapSetupButton MTR_NEWLY_AVAILABLE = 0x1000, - MTRICDManagementUserActiveModeTriggerBitmapSetupButtonSeconds MTR_NEWLY_AVAILABLE = 0x2000, - MTRICDManagementUserActiveModeTriggerBitmapSetupButtonLightsBlink MTR_NEWLY_AVAILABLE = 0x4000, - MTRICDManagementUserActiveModeTriggerBitmapSetupButtonTimes MTR_NEWLY_AVAILABLE = 0x8000, - MTRICDManagementUserActiveModeTriggerBitmapAppDefinedButton MTR_NEWLY_AVAILABLE = 0x10000, -} MTR_NEWLY_AVAILABLE; + MTRICDManagementUserActiveModeTriggerBitmapPowerCycle MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x1, + MTRICDManagementUserActiveModeTriggerBitmapSettingsMenu MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x2, + MTRICDManagementUserActiveModeTriggerBitmapCustomInstruction MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4, + MTRICDManagementUserActiveModeTriggerBitmapDeviceManual MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x8, + MTRICDManagementUserActiveModeTriggerBitmapActuateSensor MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x10, + MTRICDManagementUserActiveModeTriggerBitmapActuateSensorSeconds MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x20, + MTRICDManagementUserActiveModeTriggerBitmapActuateSensorTimes MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x40, + MTRICDManagementUserActiveModeTriggerBitmapActuateSensorLightsBlink MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x80, + MTRICDManagementUserActiveModeTriggerBitmapResetButton MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x100, + MTRICDManagementUserActiveModeTriggerBitmapResetButtonLightsBlink MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x200, + MTRICDManagementUserActiveModeTriggerBitmapResetButtonSeconds MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x400, + MTRICDManagementUserActiveModeTriggerBitmapResetButtonTimes MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x800, + MTRICDManagementUserActiveModeTriggerBitmapSetupButton MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x1000, + MTRICDManagementUserActiveModeTriggerBitmapSetupButtonSeconds MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x2000, + MTRICDManagementUserActiveModeTriggerBitmapSetupButtonLightsBlink MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4000, + MTRICDManagementUserActiveModeTriggerBitmapSetupButtonTimes MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x8000, + MTRICDManagementUserActiveModeTriggerBitmapAppDefinedButton MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x10000, +} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_ENUM(uint8_t, MTRTimerStatus) { MTRTimerStatusRunning MTR_PROVISIONALLY_AVAILABLE = 0x00, @@ -17262,16 +17262,16 @@ typedef NS_ENUM(uint16_t, MTROvenModeModeTag) { MTROvenModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, MTROvenModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, MTROvenModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTROvenModeModeTagBake MTR_NEWLY_AVAILABLE = 0x4000, - MTROvenModeModeTagConvection MTR_NEWLY_AVAILABLE = 0x4001, - MTROvenModeModeTagGrill MTR_NEWLY_AVAILABLE = 0x4002, - MTROvenModeModeTagRoast MTR_NEWLY_AVAILABLE = 0x4003, - MTROvenModeModeTagClean MTR_NEWLY_AVAILABLE = 0x4004, - MTROvenModeModeTagConvectionBake MTR_NEWLY_AVAILABLE = 0x4005, - MTROvenModeModeTagConvectionRoast MTR_NEWLY_AVAILABLE = 0x4006, - MTROvenModeModeTagWarming MTR_NEWLY_AVAILABLE = 0x4007, - MTROvenModeModeTagProofing MTR_NEWLY_AVAILABLE = 0x4008, -} MTR_NEWLY_AVAILABLE; + MTROvenModeModeTagBake MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4000, + MTROvenModeModeTagConvection MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4001, + MTROvenModeModeTagGrill MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4002, + MTROvenModeModeTagRoast MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4003, + MTROvenModeModeTagClean MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4004, + MTROvenModeModeTagConvectionBake MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4005, + MTROvenModeModeTagConvectionRoast MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4006, + MTROvenModeModeTagWarming MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4007, + MTROvenModeModeTagProofing MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4008, +} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_ENUM(uint8_t, MTRLaundryDryerControlsDrynessLevel) { MTRLaundryDryerControlsDrynessLevelLow MTR_PROVISIONALLY_AVAILABLE = 0x00, @@ -17296,11 +17296,11 @@ typedef NS_ENUM(uint16_t, MTRLaundryWasherModeModeTag) { MTRLaundryWasherModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, MTRLaundryWasherModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, MTRLaundryWasherModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRLaundryWasherModeModeTagNormal MTR_NEWLY_AVAILABLE = 0x4000, - MTRLaundryWasherModeModeTagDelicate MTR_NEWLY_AVAILABLE = 0x4001, - MTRLaundryWasherModeModeTagHeavy MTR_NEWLY_AVAILABLE = 0x4002, - MTRLaundryWasherModeModeTagWhites MTR_NEWLY_AVAILABLE = 0x4003, -} MTR_NEWLY_AVAILABLE; + MTRLaundryWasherModeModeTagNormal MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4000, + MTRLaundryWasherModeModeTagDelicate MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4001, + MTRLaundryWasherModeModeTagHeavy MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4002, + MTRLaundryWasherModeModeTagWhites MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4003, +} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_ENUM(uint16_t, MTRRefrigeratorAndTemperatureControlledCabinetModeModeTag) { MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, @@ -17313,21 +17313,21 @@ typedef NS_ENUM(uint16_t, MTRRefrigeratorAndTemperatureControlledCabinetModeMode MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagRapidCool MTR_NEWLY_AVAILABLE = 0x4000, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagRapidFreeze MTR_NEWLY_AVAILABLE = 0x4001, -} MTR_NEWLY_AVAILABLE; + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagRapidCool MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4000, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagRapidFreeze MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4001, +} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_ENUM(uint8_t, MTRLaundryWasherControlsNumberOfRinses) { - MTRLaundryWasherControlsNumberOfRinsesNone MTR_NEWLY_AVAILABLE = 0x00, - MTRLaundryWasherControlsNumberOfRinsesNormal MTR_NEWLY_AVAILABLE = 0x01, - MTRLaundryWasherControlsNumberOfRinsesExtra MTR_NEWLY_AVAILABLE = 0x02, - MTRLaundryWasherControlsNumberOfRinsesMax MTR_NEWLY_AVAILABLE = 0x03, -} MTR_NEWLY_AVAILABLE; + MTRLaundryWasherControlsNumberOfRinsesNone MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00, + MTRLaundryWasherControlsNumberOfRinsesNormal MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x01, + MTRLaundryWasherControlsNumberOfRinsesExtra MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x02, + MTRLaundryWasherControlsNumberOfRinsesMax MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x03, +} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_OPTIONS(uint32_t, MTRLaundryWasherControlsFeature) { - MTRLaundryWasherControlsFeatureSpin MTR_NEWLY_AVAILABLE = 0x1, - MTRLaundryWasherControlsFeatureRinse MTR_NEWLY_AVAILABLE = 0x2, -} MTR_NEWLY_AVAILABLE; + MTRLaundryWasherControlsFeatureSpin MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x1, + MTRLaundryWasherControlsFeatureRinse MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x2, +} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_ENUM(uint16_t, MTRRVCRunModeModeTag) { MTRRVCRunModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, @@ -17342,7 +17342,7 @@ typedef NS_ENUM(uint16_t, MTRRVCRunModeModeTag) { MTRRVCRunModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, MTRRVCRunModeModeTagIdle MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4000, MTRRVCRunModeModeTagCleaning MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4001, - MTRRVCRunModeModeTagMapping MTR_NEWLY_AVAILABLE = 0x4002, + MTRRVCRunModeModeTagMapping MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4002, } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); typedef NS_ENUM(uint8_t, MTRRVCRunModeStatusCode) { @@ -17385,14 +17385,14 @@ typedef NS_OPTIONS(uint32_t, MTRRVCCleanModeFeature) { } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); typedef NS_OPTIONS(uint32_t, MTRTemperatureControlFeature) { - MTRTemperatureControlFeatureTemperatureNumber MTR_NEWLY_AVAILABLE = 0x1, - MTRTemperatureControlFeatureTemperatureLevel MTR_NEWLY_AVAILABLE = 0x2, - MTRTemperatureControlFeatureTemperatureStep MTR_NEWLY_AVAILABLE = 0x4, -} MTR_NEWLY_AVAILABLE; + MTRTemperatureControlFeatureTemperatureNumber MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x1, + MTRTemperatureControlFeatureTemperatureLevel MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x2, + MTRTemperatureControlFeatureTemperatureStep MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4, +} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_OPTIONS(uint32_t, MTRRefrigeratorAlarmAlarmBitmap) { - MTRRefrigeratorAlarmAlarmBitmapDoorOpen MTR_NEWLY_AVAILABLE = 0x1, -} MTR_NEWLY_AVAILABLE; + MTRRefrigeratorAlarmAlarmBitmapDoorOpen MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x1, +} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_ENUM(uint16_t, MTRDishwasherModeModeTag) { MTRDishwasherModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, @@ -17405,10 +17405,10 @@ typedef NS_ENUM(uint16_t, MTRDishwasherModeModeTag) { MTRDishwasherModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, MTRDishwasherModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, MTRDishwasherModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRDishwasherModeModeTagNormal MTR_NEWLY_AVAILABLE = 0x4000, - MTRDishwasherModeModeTagHeavy MTR_NEWLY_AVAILABLE = 0x4001, - MTRDishwasherModeModeTagLight MTR_NEWLY_AVAILABLE = 0x4002, -} MTR_NEWLY_AVAILABLE; + MTRDishwasherModeModeTagNormal MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4000, + MTRDishwasherModeModeTagHeavy MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4001, + MTRDishwasherModeModeTagLight MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4002, +} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_ENUM(uint8_t, MTRAirQuality) { MTRAirQualityUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, @@ -17476,15 +17476,15 @@ typedef NS_OPTIONS(uint32_t, MTRSmokeCOAlarmFeature) { typedef NS_OPTIONS(uint32_t, MTRDishwasherAlarmAlarmBitmap) { MTRDishwasherAlarmAlarmBitmapInflowError MTR_PROVISIONALLY_AVAILABLE = 0x1, MTRDishwasherAlarmAlarmBitmapDrainError MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRDishwasherAlarmAlarmBitmapDoorError MTR_NEWLY_AVAILABLE = 0x4, + MTRDishwasherAlarmAlarmBitmapDoorError MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4, MTRDishwasherAlarmAlarmBitmapTempTooLow MTR_PROVISIONALLY_AVAILABLE = 0x8, MTRDishwasherAlarmAlarmBitmapTempTooHigh MTR_PROVISIONALLY_AVAILABLE = 0x10, MTRDishwasherAlarmAlarmBitmapWaterLevelError MTR_PROVISIONALLY_AVAILABLE = 0x20, -} MTR_NEWLY_AVAILABLE; +} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_OPTIONS(uint32_t, MTRDishwasherAlarmFeature) { - MTRDishwasherAlarmFeatureReset MTR_NEWLY_AVAILABLE = 0x1, -} MTR_NEWLY_AVAILABLE; + MTRDishwasherAlarmFeatureReset MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x1, +} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_ENUM(uint16_t, MTRMicrowaveOvenModeModeTag) { MTRMicrowaveOvenModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, @@ -17497,15 +17497,15 @@ typedef NS_ENUM(uint16_t, MTRMicrowaveOvenModeModeTag) { MTRMicrowaveOvenModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, MTRMicrowaveOvenModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, MTRMicrowaveOvenModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRMicrowaveOvenModeModeTagNormal MTR_NEWLY_AVAILABLE = 0x4000, - MTRMicrowaveOvenModeModeTagDefrost MTR_NEWLY_AVAILABLE = 0x4001, -} MTR_NEWLY_AVAILABLE; + MTRMicrowaveOvenModeModeTagNormal MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4000, + MTRMicrowaveOvenModeModeTagDefrost MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4001, +} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_OPTIONS(uint32_t, MTRMicrowaveOvenControlFeature) { - MTRMicrowaveOvenControlFeaturePowerAsNumber MTR_NEWLY_AVAILABLE = 0x1, + MTRMicrowaveOvenControlFeaturePowerAsNumber MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x1, MTRMicrowaveOvenControlFeaturePowerInWatts MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRMicrowaveOvenControlFeaturePowerNumberLimits MTR_NEWLY_AVAILABLE = 0x4, -} MTR_NEWLY_AVAILABLE; + MTRMicrowaveOvenControlFeaturePowerNumberLimits MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4, +} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_ENUM(uint8_t, MTROperationalStateErrorState) { MTROperationalStateErrorStateNoError MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, @@ -18121,7 +18121,7 @@ typedef NS_ENUM(uint8_t, MTRDoorLockDlLockState) { MTRDoorLockDlLockStateNotFullyLocked MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, MTRDoorLockDlLockStateLocked MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, MTRDoorLockDlLockStateUnlocked MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRDoorLockDlLockStateUnlatched MTR_NEWLY_AVAILABLE = 0x03, + MTRDoorLockDlLockStateUnlatched MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x03, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint8_t, MTRDoorLockDlLockType) { @@ -18136,7 +18136,7 @@ typedef NS_ENUM(uint8_t, MTRDoorLockDlLockType) { MTRDoorLockDlLockTypeInterconnectedLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, MTRDoorLockDlLockTypeDeadLatch MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, MTRDoorLockDlLockTypeDoorFurniture MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0A, - MTRDoorLockDlLockTypeEurocylinder MTR_NEWLY_AVAILABLE = 0x0B, + MTRDoorLockDlLockTypeEurocylinder MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x0B, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint8_t, MTRDoorLockDlStatus) { @@ -18236,7 +18236,7 @@ typedef NS_ENUM(uint8_t, MTRDoorLockLockOperationType) { MTRDoorLockLockOperationTypeUnlock MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, MTRDoorLockLockOperationTypeNonAccessUserEvent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, MTRDoorLockLockOperationTypeForcedUserEvent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, - MTRDoorLockLockOperationTypeUnlatch MTR_NEWLY_AVAILABLE = 0x04, + MTRDoorLockLockOperationTypeUnlatch MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x04, } MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); typedef NS_ENUM(uint8_t, MTRDoorLockDlLockOperationType) { @@ -18502,7 +18502,7 @@ typedef NS_OPTIONS(uint32_t, MTRDoorLockFeature) { MTRDoorLockFeatureYearDayAccessSchedules MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x400, MTRDoorLockFeatureYearDaySchedules MTR_DEPRECATED("Please use MTRDoorLockFeatureYearDayAccessSchedules", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x400, MTRDoorLockFeatureHolidaySchedules MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x800, - MTRDoorLockFeatureUnbolt MTR_NEWLY_AVAILABLE = 0x1000, + MTRDoorLockFeatureUnbolt MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x1000, MTRDoorLockFeatureAliroProvisioning MTR_PROVISIONALLY_AVAILABLE = 0x2000, MTRDoorLockFeatureAliroBLEUWB MTR_PROVISIONALLY_AVAILABLE = 0x4000, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 13eb74ac924bdf..95c91d9ab34423 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -117,25 +117,25 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeFixedLabelID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000040, MTRClusterIDTypeUserLabelID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000041, MTRClusterIDTypeBooleanStateID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000045, - MTRClusterIDTypeICDManagementID MTR_NEWLY_AVAILABLE = 0x00000046, + MTRClusterIDTypeICDManagementID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000046, MTRClusterIDTypeTimerID MTR_PROVISIONALLY_AVAILABLE = 0x00000047, - MTRClusterIDTypeOvenCavityOperationalStateID MTR_NEWLY_AVAILABLE = 0x00000048, - MTRClusterIDTypeOvenModeID MTR_NEWLY_AVAILABLE = 0x00000049, + MTRClusterIDTypeOvenCavityOperationalStateID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000048, + MTRClusterIDTypeOvenModeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000049, MTRClusterIDTypeLaundryDryerControlsID MTR_PROVISIONALLY_AVAILABLE = 0x0000004A, MTRClusterIDTypeModeSelectID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000050, - MTRClusterIDTypeLaundryWasherModeID MTR_NEWLY_AVAILABLE = 0x00000051, - MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID MTR_NEWLY_AVAILABLE = 0x00000052, - MTRClusterIDTypeLaundryWasherControlsID MTR_NEWLY_AVAILABLE = 0x00000053, + MTRClusterIDTypeLaundryWasherModeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000051, + MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000052, + MTRClusterIDTypeLaundryWasherControlsID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000053, MTRClusterIDTypeRVCRunModeID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000054, MTRClusterIDTypeRVCCleanModeID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000055, - MTRClusterIDTypeTemperatureControlID MTR_NEWLY_AVAILABLE = 0x00000056, - MTRClusterIDTypeRefrigeratorAlarmID MTR_NEWLY_AVAILABLE = 0x00000057, - MTRClusterIDTypeDishwasherModeID MTR_NEWLY_AVAILABLE = 0x00000059, + MTRClusterIDTypeTemperatureControlID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000056, + MTRClusterIDTypeRefrigeratorAlarmID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000057, + MTRClusterIDTypeDishwasherModeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000059, MTRClusterIDTypeAirQualityID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000005B, MTRClusterIDTypeSmokeCOAlarmID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000005C, - MTRClusterIDTypeDishwasherAlarmID MTR_NEWLY_AVAILABLE = 0x0000005D, - MTRClusterIDTypeMicrowaveOvenModeID MTR_NEWLY_AVAILABLE = 0x0000005E, - MTRClusterIDTypeMicrowaveOvenControlID MTR_NEWLY_AVAILABLE = 0x0000005F, + MTRClusterIDTypeDishwasherAlarmID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x0000005D, + MTRClusterIDTypeMicrowaveOvenModeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x0000005E, + MTRClusterIDTypeMicrowaveOvenControlID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x0000005F, MTRClusterIDTypeOperationalStateID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000060, MTRClusterIDTypeRVCOperationalStateID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000061, MTRClusterIDTypeScenesManagementID MTR_PROVISIONALLY_AVAILABLE = 0x00000062, @@ -2096,21 +2096,21 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBooleanStateAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster ICDManagement attributes - MTRAttributeIDTypeClusterICDManagementAttributeIdleModeDurationID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterICDManagementAttributeActiveModeDurationID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterICDManagementAttributeActiveModeThresholdID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterICDManagementAttributeRegisteredClientsID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterICDManagementAttributeICDCounterID MTR_NEWLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterICDManagementAttributeClientsSupportedPerFabricID MTR_NEWLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerHintID MTR_NEWLY_AVAILABLE = 0x00000006, - MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerInstructionID MTR_NEWLY_AVAILABLE = 0x00000007, - MTRAttributeIDTypeClusterICDManagementAttributeOperatingModeID MTR_NEWLY_AVAILABLE = 0x00000008, - MTRAttributeIDTypeClusterICDManagementAttributeMaximumCheckInBackOffID MTR_NEWLY_AVAILABLE = 0x00000009, - MTRAttributeIDTypeClusterICDManagementAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterICDManagementAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterICDManagementAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterICDManagementAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterICDManagementAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterICDManagementAttributeIdleModeDurationID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTRAttributeIDTypeClusterICDManagementAttributeActiveModeDurationID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, + MTRAttributeIDTypeClusterICDManagementAttributeActiveModeThresholdID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000002, + MTRAttributeIDTypeClusterICDManagementAttributeRegisteredClientsID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000003, + MTRAttributeIDTypeClusterICDManagementAttributeICDCounterID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000004, + MTRAttributeIDTypeClusterICDManagementAttributeClientsSupportedPerFabricID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000005, + MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerHintID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000006, + MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerInstructionID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000007, + MTRAttributeIDTypeClusterICDManagementAttributeOperatingModeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000008, + MTRAttributeIDTypeClusterICDManagementAttributeMaximumCheckInBackOffID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000009, + MTRAttributeIDTypeClusterICDManagementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterICDManagementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterICDManagementAttributeAttributeListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterICDManagementAttributeFeatureMapID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterICDManagementAttributeClusterRevisionID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster Timer attributes MTRAttributeIDTypeClusterTimerAttributeSetTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -2123,26 +2123,26 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTimerAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster OvenCavityOperationalState attributes - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributePhaseListID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCurrentPhaseID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCountdownTimeID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateListID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateID MTR_NEWLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalErrorID MTR_NEWLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributePhaseListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCurrentPhaseID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCountdownTimeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000002, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000003, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000004, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalErrorID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000005, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeGeneratedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAcceptedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAttributeListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeFeatureMapID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeClusterRevisionID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster OvenMode attributes - MTRAttributeIDTypeClusterOvenModeAttributeSupportedModesID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterOvenModeAttributeCurrentModeID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterOvenModeAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterOvenModeAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOvenModeAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterOvenModeAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterOvenModeAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterOvenModeAttributeSupportedModesID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTRAttributeIDTypeClusterOvenModeAttributeCurrentModeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, + MTRAttributeIDTypeClusterOvenModeAttributeGeneratedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterOvenModeAttributeAcceptedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterOvenModeAttributeAttributeListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterOvenModeAttributeFeatureMapID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterOvenModeAttributeClusterRevisionID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster LaundryDryerControls attributes MTRAttributeIDTypeClusterLaundryDryerControlsAttributeSupportedDrynessLevelsID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -2202,33 +2202,33 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterModeSelectAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster LaundryWasherMode attributes - MTRAttributeIDTypeClusterLaundryWasherModeAttributeSupportedModesID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeCurrentModeID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeSupportedModesID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeCurrentModeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeGeneratedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeAcceptedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeAttributeListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeFeatureMapID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeClusterRevisionID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster RefrigeratorAndTemperatureControlledCabinetMode attributes - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeSupportedModesID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeCurrentModeID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeSupportedModesID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeCurrentModeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeGeneratedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAcceptedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAttributeListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeFeatureMapID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeClusterRevisionID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster LaundryWasherControls attributes - MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedsID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSupportedRinsesID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterLaundryWasherControlsAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterLaundryWasherControlsAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterLaundryWasherControlsAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedsID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000002, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSupportedRinsesID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000003, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeGeneratedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAcceptedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAttributeListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeFeatureMapID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeClusterRevisionID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster RVCRunMode attributes MTRAttributeIDTypeClusterRVCRunModeAttributeSupportedModesID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000000, @@ -2249,36 +2249,36 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterRVCCleanModeAttributeClusterRevisionID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster TemperatureControl attributes - MTRAttributeIDTypeClusterTemperatureControlAttributeTemperatureSetpointID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterTemperatureControlAttributeMinTemperatureID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterTemperatureControlAttributeMaxTemperatureID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterTemperatureControlAttributeStepID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterTemperatureControlAttributeSelectedTemperatureLevelID MTR_NEWLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterTemperatureControlAttributeSupportedTemperatureLevelsID MTR_NEWLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterTemperatureControlAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterTemperatureControlAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTemperatureControlAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterTemperatureControlAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterTemperatureControlAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterTemperatureControlAttributeTemperatureSetpointID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTRAttributeIDTypeClusterTemperatureControlAttributeMinTemperatureID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, + MTRAttributeIDTypeClusterTemperatureControlAttributeMaxTemperatureID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000002, + MTRAttributeIDTypeClusterTemperatureControlAttributeStepID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000003, + MTRAttributeIDTypeClusterTemperatureControlAttributeSelectedTemperatureLevelID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000004, + MTRAttributeIDTypeClusterTemperatureControlAttributeSupportedTemperatureLevelsID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000005, + MTRAttributeIDTypeClusterTemperatureControlAttributeGeneratedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterTemperatureControlAttributeAcceptedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterTemperatureControlAttributeAttributeListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterTemperatureControlAttributeFeatureMapID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterTemperatureControlAttributeClusterRevisionID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster RefrigeratorAlarm attributes - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeMaskID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeStateID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeSupportedID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeMaskID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeStateID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000002, + MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeSupportedID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000003, + MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeGeneratedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAcceptedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAttributeListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeFeatureMapID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeClusterRevisionID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster DishwasherMode attributes - MTRAttributeIDTypeClusterDishwasherModeAttributeSupportedModesID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterDishwasherModeAttributeCurrentModeID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterDishwasherModeAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterDishwasherModeAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterDishwasherModeAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterDishwasherModeAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterDishwasherModeAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterDishwasherModeAttributeSupportedModesID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTRAttributeIDTypeClusterDishwasherModeAttributeCurrentModeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, + MTRAttributeIDTypeClusterDishwasherModeAttributeGeneratedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterDishwasherModeAttributeAcceptedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterDishwasherModeAttributeAttributeListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterDishwasherModeAttributeFeatureMapID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterDishwasherModeAttributeClusterRevisionID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster AirQuality attributes MTRAttributeIDTypeClusterAirQualityAttributeAirQualityID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00000000, @@ -2309,40 +2309,40 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterSmokeCOAlarmAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster DishwasherAlarm attributes - MTRAttributeIDTypeClusterDishwasherAlarmAttributeMaskID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterDishwasherAlarmAttributeLatchID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterDishwasherAlarmAttributeStateID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterDishwasherAlarmAttributeSupportedID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterDishwasherAlarmAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterDishwasherAlarmAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterDishwasherAlarmAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterDishwasherAlarmAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterDishwasherAlarmAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterDishwasherAlarmAttributeMaskID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTRAttributeIDTypeClusterDishwasherAlarmAttributeLatchID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, + MTRAttributeIDTypeClusterDishwasherAlarmAttributeStateID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000002, + MTRAttributeIDTypeClusterDishwasherAlarmAttributeSupportedID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000003, + MTRAttributeIDTypeClusterDishwasherAlarmAttributeGeneratedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterDishwasherAlarmAttributeAcceptedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterDishwasherAlarmAttributeAttributeListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterDishwasherAlarmAttributeFeatureMapID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterDishwasherAlarmAttributeClusterRevisionID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster MicrowaveOvenMode attributes - MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeSupportedModesID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeCurrentModeID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeSupportedModesID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeCurrentModeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, + MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeGeneratedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAcceptedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAttributeListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeFeatureMapID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeClusterRevisionID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster MicrowaveOvenControl attributes - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeCookTimeID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxCookTimeID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerSettingID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMinPowerID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxPowerID MTR_NEWLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerStepID MTR_NEWLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeCookTimeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxCookTimeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerSettingID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000002, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMinPowerID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000003, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxPowerID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000004, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerStepID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000005, MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeSupportedWattsID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeSelectedWattIndexID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeWattRatingID MTR_NEWLY_AVAILABLE = 0x00000008, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeWattRatingID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000008, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeGeneratedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAcceptedCommandListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAttributeListID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeFeatureMapID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeClusterRevisionID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster OperationalState attributes MTRAttributeIDTypeClusterOperationalStateAttributePhaseListID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000000, @@ -6246,11 +6246,11 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetReadAllIndicesResponseID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000005, // Cluster ICDManagement commands - MTRCommandIDTypeClusterICDManagementCommandRegisterClientID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterICDManagementCommandRegisterClientResponseID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRCommandIDTypeClusterICDManagementCommandUnregisterClientID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRCommandIDTypeClusterICDManagementCommandStayActiveRequestID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRCommandIDTypeClusterICDManagementCommandStayActiveResponseID MTR_NEWLY_AVAILABLE = 0x00000004, + MTRCommandIDTypeClusterICDManagementCommandRegisterClientID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTRCommandIDTypeClusterICDManagementCommandRegisterClientResponseID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, + MTRCommandIDTypeClusterICDManagementCommandUnregisterClientID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000002, + MTRCommandIDTypeClusterICDManagementCommandStayActiveRequestID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000003, + MTRCommandIDTypeClusterICDManagementCommandStayActiveResponseID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000004, // Cluster Timer commands MTRCommandIDTypeClusterTimerCommandSetTimerID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -6259,13 +6259,13 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterTimerCommandReduceTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, // Cluster OvenCavityOperationalState commands - MTRCommandIDTypeClusterOvenCavityOperationalStateCommandStopID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRCommandIDTypeClusterOvenCavityOperationalStateCommandStartID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRCommandIDTypeClusterOvenCavityOperationalStateCommandOperationalCommandResponseID MTR_NEWLY_AVAILABLE = 0x00000004, + MTRCommandIDTypeClusterOvenCavityOperationalStateCommandStopID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, + MTRCommandIDTypeClusterOvenCavityOperationalStateCommandStartID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000002, + MTRCommandIDTypeClusterOvenCavityOperationalStateCommandOperationalCommandResponseID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000004, // Cluster OvenMode commands - MTRCommandIDTypeClusterOvenModeCommandChangeToModeID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterOvenModeCommandChangeToModeResponseID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterOvenModeCommandChangeToModeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTRCommandIDTypeClusterOvenModeCommandChangeToModeResponseID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, // Cluster ModeSelect deprecated command id names MTRClusterModeSelectCommandChangeToModeID @@ -6276,12 +6276,12 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterModeSelectCommandChangeToModeID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, // Cluster LaundryWasherMode commands - MTRCommandIDTypeClusterLaundryWasherModeCommandChangeToModeID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterLaundryWasherModeCommandChangeToModeResponseID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterLaundryWasherModeCommandChangeToModeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTRCommandIDTypeClusterLaundryWasherModeCommandChangeToModeResponseID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, // Cluster RefrigeratorAndTemperatureControlledCabinetMode commands - MTRCommandIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeCommandChangeToModeID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeCommandChangeToModeResponseID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeCommandChangeToModeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTRCommandIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeCommandChangeToModeResponseID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, // Cluster RVCRunMode commands MTRCommandIDTypeClusterRVCRunModeCommandChangeToModeID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000000, @@ -6292,22 +6292,22 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterRVCCleanModeCommandChangeToModeResponseID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000001, // Cluster TemperatureControl commands - MTRCommandIDTypeClusterTemperatureControlCommandSetTemperatureID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterTemperatureControlCommandSetTemperatureID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, // Cluster DishwasherMode commands - MTRCommandIDTypeClusterDishwasherModeCommandChangeToModeID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterDishwasherModeCommandChangeToModeResponseID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterDishwasherModeCommandChangeToModeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTRCommandIDTypeClusterDishwasherModeCommandChangeToModeResponseID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, // Cluster SmokeCOAlarm commands MTRCommandIDTypeClusterSmokeCOAlarmCommandSelfTestRequestID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00000000, // Cluster DishwasherAlarm commands - MTRCommandIDTypeClusterDishwasherAlarmCommandResetID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterDishwasherAlarmCommandModifyEnabledAlarmsID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterDishwasherAlarmCommandResetID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTRCommandIDTypeClusterDishwasherAlarmCommandModifyEnabledAlarmsID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, // Cluster MicrowaveOvenControl commands - MTRCommandIDTypeClusterMicrowaveOvenControlCommandSetCookingParametersID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterMicrowaveOvenControlCommandAddMoreTimeID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterMicrowaveOvenControlCommandSetCookingParametersID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTRCommandIDTypeClusterMicrowaveOvenControlCommandAddMoreTimeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, // Cluster OperationalState commands MTRCommandIDTypeClusterOperationalStateCommandPauseID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000000, @@ -6320,7 +6320,7 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterRVCOperationalStateCommandPauseID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000000, MTRCommandIDTypeClusterRVCOperationalStateCommandResumeID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000003, MTRCommandIDTypeClusterRVCOperationalStateCommandOperationalCommandResponseID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000004, - MTRCommandIDTypeClusterRVCOperationalStateCommandGoHomeID MTR_NEWLY_AVAILABLE = 0x00000080, + MTRCommandIDTypeClusterRVCOperationalStateCommandGoHomeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000080, // Cluster ScenesManagement commands MTRCommandIDTypeClusterScenesManagementCommandAddSceneID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -6499,7 +6499,7 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterDoorLockCommandGetCredentialStatusID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000024, MTRCommandIDTypeClusterDoorLockCommandGetCredentialStatusResponseID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000025, MTRCommandIDTypeClusterDoorLockCommandClearCredentialID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000026, - MTRCommandIDTypeClusterDoorLockCommandUnboltDoorID MTR_NEWLY_AVAILABLE = 0x00000027, + MTRCommandIDTypeClusterDoorLockCommandUnboltDoorID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000027, MTRCommandIDTypeClusterDoorLockCommandSetAliroReaderConfigID MTR_PROVISIONALLY_AVAILABLE = 0x00000028, MTRCommandIDTypeClusterDoorLockCommandClearAliroReaderConfigID MTR_PROVISIONALLY_AVAILABLE = 0x00000029, @@ -7319,11 +7319,11 @@ typedef NS_ENUM(uint32_t, MTREventIDType) { MTREventIDTypeClusterBooleanStateEventStateChangeID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, // Cluster OvenCavityOperationalState events - MTREventIDTypeClusterOvenCavityOperationalStateEventOperationalErrorID MTR_NEWLY_AVAILABLE = 0x00000000, - MTREventIDTypeClusterOvenCavityOperationalStateEventOperationCompletionID MTR_NEWLY_AVAILABLE = 0x00000001, + MTREventIDTypeClusterOvenCavityOperationalStateEventOperationalErrorID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, + MTREventIDTypeClusterOvenCavityOperationalStateEventOperationCompletionID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001, // Cluster RefrigeratorAlarm events - MTREventIDTypeClusterRefrigeratorAlarmEventNotifyID MTR_NEWLY_AVAILABLE = 0x00000000, + MTREventIDTypeClusterRefrigeratorAlarmEventNotifyID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, // Cluster SmokeCOAlarm events MTREventIDTypeClusterSmokeCOAlarmEventSmokeAlarmID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00000000, @@ -7339,7 +7339,7 @@ typedef NS_ENUM(uint32_t, MTREventIDType) { MTREventIDTypeClusterSmokeCOAlarmEventAllClearID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000000A, // Cluster DishwasherAlarm events - MTREventIDTypeClusterDishwasherAlarmEventNotifyID MTR_NEWLY_AVAILABLE = 0x00000000, + MTREventIDTypeClusterDishwasherAlarmEventNotifyID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000, // Cluster OperationalState events MTREventIDTypeClusterOperationalStateEventOperationalErrorID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000000, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 064c5270bde7c5..e3304d4f790586 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -1930,42 +1930,42 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * Cluster ICD Management * Allows servers to ensure that listed clients are notified when a server is available for communication. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRClusterICDManagement : MTRGenericCluster -- (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterRegisterClientResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterRegisterClientResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +- (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeIdleModeDurationWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeIdleModeDurationWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeActiveModeDurationWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeActiveModeDurationWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeActiveModeThresholdWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeActiveModeThresholdWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeICDCounterWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeICDCounterWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeClientsSupportedPerFabricWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClientsSupportedPerFabricWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeUserActiveModeTriggerHintWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeUserActiveModeTriggerHintWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeUserActiveModeTriggerInstructionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeUserActiveModeTriggerInstructionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeOperatingModeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeOperatingModeWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeMaximumCheckInBackOffWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeMaximumCheckInBackOffWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -1980,7 +1980,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -2035,37 +2035,37 @@ MTR_PROVISIONALLY_AVAILABLE * Cluster Oven Cavity Operational State * This cluster supports remotely monitoring and, where supported, changing the operational state of an Oven. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRClusterOvenCavityOperationalState : MTRGenericCluster -- (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)stopWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +- (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)startWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2080,7 +2080,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -2088,24 +2088,24 @@ MTR_NEWLY_AVAILABLE * Cluster Oven Mode * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRClusterOvenMode : MTRGenericCluster -- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2120,7 +2120,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -2221,24 +2221,24 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * Cluster Laundry Washer Mode * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRClusterLaundryWasherMode : MTRGenericCluster -- (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2253,7 +2253,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -2261,24 +2261,24 @@ MTR_NEWLY_AVAILABLE * Cluster Refrigerator And Temperature Controlled Cabinet Mode * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRClusterRefrigeratorAndTemperatureControlledCabinetMode : MTRGenericCluster -- (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2293,7 +2293,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -2301,30 +2301,30 @@ MTR_NEWLY_AVAILABLE * Cluster Laundry Washer Controls * This cluster supports remotely monitoring and controlling the different types of functionality available to a washing device, such as a washing machine. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRClusterLaundryWasherControls : MTRGenericCluster -- (NSDictionary * _Nullable)readAttributeSpinSpeedsWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSpinSpeedsWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeSpinSpeedCurrentWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_NEWLY_AVAILABLE; -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSpinSpeedCurrentWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeNumberOfRinsesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_NEWLY_AVAILABLE; -- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeNumberOfRinsesWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeSupportedRinsesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedRinsesWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2339,7 +2339,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -2427,34 +2427,34 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) * Cluster Temperature Control * Attributes and commands for configuring the temperature control, and reporting temperature. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRClusterTemperatureControl : MTRGenericCluster -- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)setTemperatureWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion - MTR_NEWLY_AVAILABLE; + MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeTemperatureSetpointWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeTemperatureSetpointWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeMinTemperatureWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeMinTemperatureWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeMaxTemperatureWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeMaxTemperatureWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeStepWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeStepWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeSelectedTemperatureLevelWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSelectedTemperatureLevelWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeSupportedTemperatureLevelsWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedTemperatureLevelsWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2469,7 +2469,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -2477,24 +2477,24 @@ MTR_NEWLY_AVAILABLE * Cluster Refrigerator Alarm * Attributes and commands for configuring the Refrigerator alarm. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRClusterRefrigeratorAlarm : MTRGenericCluster -- (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2509,7 +2509,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -2517,24 +2517,24 @@ MTR_NEWLY_AVAILABLE * Cluster Dishwasher Mode * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRClusterDishwasherMode : MTRGenericCluster -- (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2549,7 +2549,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -2659,29 +2659,29 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) * Cluster Dishwasher Alarm * Attributes and commands for configuring the Dishwasher alarm. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRClusterDishwasherAlarm : MTRGenericCluster -- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeLatchWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeLatchWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2696,7 +2696,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -2704,22 +2704,22 @@ MTR_NEWLY_AVAILABLE * Cluster Microwave Oven Mode * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRClusterMicrowaveOvenMode : MTRGenericCluster -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2734,7 +2734,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -2742,41 +2742,41 @@ MTR_NEWLY_AVAILABLE * Cluster Microwave Oven Control * Attributes and commands for configuring the microwave oven control, and reporting cooking stats. */ -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRClusterMicrowaveOvenControl : MTRGenericCluster -- (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCookingParametersParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCookingParametersParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)setCookingParametersWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion - MTR_NEWLY_AVAILABLE; -- (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; + MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +- (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeCookTimeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCookTimeWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeMaxCookTimeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeMaxCookTimeWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributePowerSettingWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributePowerSettingWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeMinPowerWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeMinPowerWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeMaxPowerWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeMaxPowerWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributePowerStepWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributePowerStepWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (NSDictionary * _Nullable)readAttributeSupportedWattsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeSelectedWattIndexWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeWattRatingWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeWattRatingWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2791,7 +2791,7 @@ MTR_NEWLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end @@ -2867,9 +2867,9 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (void)resumeWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (void)goHomeWithParams:(MTRRVCOperationalStateClusterGoHomeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)goHomeWithParams:(MTRRVCOperationalStateClusterGoHomeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)goHomeWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); @@ -3859,9 +3859,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)unboltDoorWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion - MTR_NEWLY_AVAILABLE; + MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); - (void)setAliroReaderConfigWithParams:(MTRDoorLockClusterSetAliroReaderConfigParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)clearAliroReaderConfigWithParams:(MTRDoorLockClusterClearAliroReaderConfigParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)clearAliroReaderConfigWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 99fb9907578172..6d036be1e0b7e6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -3740,18 +3740,18 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRICDManagementClusterRegisterClientParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull checkInNodeID MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull checkInNodeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -@property (nonatomic, copy) NSNumber * _Nonnull monitoredSubject MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull monitoredSubject MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -@property (nonatomic, copy) NSData * _Nonnull key MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nonnull key MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -@property (nonatomic, copy) NSData * _Nullable verificationKey MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nullable verificationKey MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -@property (nonatomic, copy) NSNumber * _Nonnull clientType MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull clientType MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3778,10 +3778,10 @@ MTR_NEWLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRICDManagementClusterRegisterClientResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull icdCounter MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull icdCounter MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Initialize an MTRICDManagementClusterRegisterClientResponseParams with a response-value dictionary @@ -3794,15 +3794,15 @@ MTR_NEWLY_AVAILABLE * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRICDManagementClusterUnregisterClientParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull checkInNodeID MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull checkInNodeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -@property (nonatomic, copy) NSData * _Nullable verificationKey MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nullable verificationKey MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3829,10 +3829,10 @@ MTR_NEWLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRICDManagementClusterStayActiveRequestParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull stayActiveDuration MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull stayActiveDuration MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3859,10 +3859,10 @@ MTR_NEWLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRICDManagementClusterStayActiveResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull promisedActiveDuration MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull promisedActiveDuration MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Initialize an MTRICDManagementClusterStayActiveResponseParams with a response-value dictionary @@ -3875,7 +3875,7 @@ MTR_NEWLY_AVAILABLE * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end MTR_PROVISIONALLY_AVAILABLE @@ -3996,7 +3996,7 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTROvenCavityOperationalStateClusterStopParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). @@ -4024,7 +4024,7 @@ MTR_NEWLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTROvenCavityOperationalStateClusterStartParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). @@ -4052,10 +4052,10 @@ MTR_NEWLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTROvenCavityOperationalStateClusterOperationalCommandResponseParams : NSObject -@property (nonatomic, copy) MTROvenCavityOperationalStateClusterErrorStateStruct * _Nonnull commandResponseState MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) MTROvenCavityOperationalStateClusterErrorStateStruct * _Nonnull commandResponseState MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Initialize an MTROvenCavityOperationalStateClusterOperationalCommandResponseParams with a response-value dictionary @@ -4068,13 +4068,13 @@ MTR_NEWLY_AVAILABLE * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTROvenModeClusterChangeToModeParams : NSObject -@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4101,12 +4101,12 @@ MTR_NEWLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTROvenModeClusterChangeToModeResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -@property (nonatomic, copy) NSString * _Nullable statusText MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable statusText MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Initialize an MTROvenModeClusterChangeToModeResponseParams with a response-value dictionary @@ -4119,7 +4119,7 @@ MTR_NEWLY_AVAILABLE * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -4152,10 +4152,10 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRLaundryWasherModeClusterChangeToModeParams : NSObject -@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4182,12 +4182,12 @@ MTR_NEWLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRLaundryWasherModeClusterChangeToModeResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -@property (nonatomic, copy) NSString * _Nullable statusText MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable statusText MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Initialize an MTRLaundryWasherModeClusterChangeToModeResponseParams with a response-value dictionary @@ -4200,13 +4200,13 @@ MTR_NEWLY_AVAILABLE * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams : NSObject -@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4233,12 +4233,12 @@ MTR_NEWLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -@property (nonatomic, copy) NSString * _Nullable statusText MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable statusText MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Initialize an MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams with a response-value dictionary @@ -4251,7 +4251,7 @@ MTR_NEWLY_AVAILABLE * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @@ -4356,12 +4356,12 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRTemperatureControlClusterSetTemperatureParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable targetTemperature MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable targetTemperature MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -@property (nonatomic, copy) NSNumber * _Nullable targetTemperatureLevel MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable targetTemperatureLevel MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4388,10 +4388,10 @@ MTR_NEWLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRDishwasherModeClusterChangeToModeParams : NSObject -@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4418,12 +4418,12 @@ MTR_NEWLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRDishwasherModeClusterChangeToModeResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -@property (nonatomic, copy) NSString * _Nullable statusText MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable statusText MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Initialize an MTRDishwasherModeClusterChangeToModeResponseParams with a response-value dictionary @@ -4436,7 +4436,7 @@ MTR_NEWLY_AVAILABLE * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) @@ -4467,10 +4467,10 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRDishwasherAlarmClusterResetParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull alarms MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull alarms MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4497,10 +4497,10 @@ MTR_NEWLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRDishwasherAlarmClusterModifyEnabledAlarmsParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull mask MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull mask MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4527,18 +4527,18 @@ MTR_NEWLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRMicrowaveOvenControlClusterSetCookingParametersParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable cookMode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable cookMode MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -@property (nonatomic, copy) NSNumber * _Nullable cookTime MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable cookTime MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); -@property (nonatomic, copy) NSNumber * _Nullable powerSetting MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable powerSetting MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @property (nonatomic, copy) NSNumber * _Nullable wattSettingIndex MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable startAfterSetting MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable startAfterSetting MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4565,10 +4565,10 @@ MTR_NEWLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRMicrowaveOvenControlClusterAddMoreTimeParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull timeToAdd MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull timeToAdd MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4801,7 +4801,7 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRRVCOperationalStateClusterGoHomeParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). @@ -7218,10 +7218,10 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRDoorLockClusterUnboltDoorParams : NSObject -@property (nonatomic, copy) NSData * _Nullable pinCode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nullable pinCode MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 8c3e822741c943..f6e17d8bb4cfae 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -812,50 +812,50 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSNumber * _Nonnull stateValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRICDManagementClusterMonitoringRegistrationStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull checkInNodeID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull monitoredSubject MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull clientType MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull checkInNodeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nonnull monitoredSubject MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nonnull clientType MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTROvenCavityOperationalStateClusterErrorStateStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull errorStateID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable errorStateLabel MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable errorStateDetails MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull errorStateID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSString * _Nullable errorStateLabel MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSString * _Nullable errorStateDetails MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTROvenCavityOperationalStateClusterOperationalStateStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull operationalStateID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable operationalStateLabel MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull operationalStateID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSString * _Nullable operationalStateLabel MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTROvenCavityOperationalStateClusterOperationalErrorEvent : NSObject -@property (nonatomic, copy) MTROvenCavityOperationalStateClusterErrorStateStruct * _Nonnull errorState MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) MTROvenCavityOperationalStateClusterErrorStateStruct * _Nonnull errorState MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTROvenCavityOperationalStateClusterOperationCompletionEvent : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull completionErrorCode MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable totalOperationalTime MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable pausedTime MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull completionErrorCode MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nullable totalOperationalTime MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nullable pausedTime MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTROvenModeClusterModeTagStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull value MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nonnull value MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTROvenModeClusterModeOptionStruct : NSObject -@property (nonatomic, copy) NSString * _Nonnull label MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull label MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -877,30 +877,30 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSArray * _Nonnull semanticTags MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRLaundryWasherModeClusterModeTagStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull value MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nonnull value MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRLaundryWasherModeClusterModeOptionStruct : NSObject -@property (nonatomic, copy) NSString * _Nonnull label MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull label MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRRefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull value MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nonnull value MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRRefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct : NSObject -@property (nonatomic, copy) NSString * _Nonnull label MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull label MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @@ -929,25 +929,25 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRRefrigeratorAlarmClusterNotifyEvent : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull active MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull inactive MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull state MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull mask MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull active MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nonnull inactive MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nonnull state MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nonnull mask MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRDishwasherModeClusterModeTagStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull value MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nonnull value MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRDishwasherModeClusterModeOptionStruct : NSObject -@property (nonatomic, copy) NSString * _Nonnull label MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull label MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) @@ -999,25 +999,25 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) @interface MTRSmokeCOAlarmClusterAllClearEvent : NSObject @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRDishwasherAlarmClusterNotifyEvent : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull active MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull inactive MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull state MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull mask MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull active MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nonnull inactive MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nonnull state MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nonnull mask MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRMicrowaveOvenModeClusterModeTagStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull value MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nonnull value MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end -MTR_NEWLY_AVAILABLE +MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) @interface MTRMicrowaveOvenModeClusterModeOptionStruct : NSObject -@property (nonatomic, copy) NSString * _Nonnull label MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull label MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); +@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @end MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) From 7ceaf6f527108e0dbda9729471a6abb6814b5182 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Wed, 11 Dec 2024 23:14:53 +0100 Subject: [PATCH 29/72] [Fabric-Sync] Synchronize all required attributes (#36780) * [Fabric-Sync] Synchronize all required attributes * Revert commit 8126bbd * Synchronize all required attributes --- .../admin/DeviceSynchronization.cpp | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/examples/fabric-sync/admin/DeviceSynchronization.cpp b/examples/fabric-sync/admin/DeviceSynchronization.cpp index fea80780d5bb24..83e3f85ba1e5e4 100644 --- a/examples/fabric-sync/admin/DeviceSynchronization.cpp +++ b/examples/fabric-sync/admin/DeviceSynchronization.cpp @@ -91,6 +91,14 @@ void DeviceSynchronizer::OnAttributeData(const ConcreteDataAttributePath & path, } } break; + case Clusters::BasicInformation::Attributes::VendorID::Id: { + uint32_t vendorId; + if (SuccessOrLog(data->Get(vendorId), "VendorID")) + { + mCurrentDeviceData.vendorId = static_cast(vendorId); + } + } + break; case Clusters::BasicInformation::Attributes::VendorName::Id: { char vendorNameBuffer[kBasicInformationAttributeBufSize]; if (SuccessOrLog(data->GetString(vendorNameBuffer, sizeof(vendorNameBuffer)), "VendorName")) @@ -99,6 +107,14 @@ void DeviceSynchronizer::OnAttributeData(const ConcreteDataAttributePath & path, } } break; + case Clusters::BasicInformation::Attributes::ProductID::Id: { + uint32_t productId; + if (SuccessOrLog(data->Get(productId), "ProductID")) + { + mCurrentDeviceData.productId = productId; + } + } + break; case Clusters::BasicInformation::Attributes::ProductName::Id: { char productNameBuffer[kBasicInformationAttributeBufSize]; if (SuccessOrLog(data->GetString(productNameBuffer, sizeof(productNameBuffer)), "ProductName")) @@ -124,6 +140,14 @@ void DeviceSynchronizer::OnAttributeData(const ConcreteDataAttributePath & path, } } break; + case Clusters::BasicInformation::Attributes::SoftwareVersion::Id: { + uint32_t softwareVersion; + if (SuccessOrLog(data->Get(softwareVersion), "SoftwareVersion")) + { + mCurrentDeviceData.softwareVersion = softwareVersion; + } + } + break; case Clusters::BasicInformation::Attributes::SoftwareVersionString::Id: { char softwareVersionStringBuffer[kBasicInformationAttributeBufSize]; if (SuccessOrLog(data->GetString(softwareVersionStringBuffer, sizeof(softwareVersionStringBuffer)), From 75ab4c9a3fd2e519e5f6218f50ed79e677165d68 Mon Sep 17 00:00:00 2001 From: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:39:45 +1300 Subject: [PATCH 30/72] Use timeout from PerformCommissioningStep for kReadCommissioningInfo reads (#36812) Fixes #36803 --- src/controller/CHIPDeviceController.cpp | 10 +++++----- src/controller/CHIPDeviceController.h | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 1d0d36bd57f85e..e4b566f43b89db 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -2344,8 +2344,7 @@ void DeviceCommissioner::ContinueReadingCommissioningInfo(const CommissioningPar mReadCommissioningInfoProgress = kReadProgressNoFurtherAttributes; } - const auto timeout = MakeOptional(app::kExpectedIMProcessingTime); // TODO: Save timeout from PerformCommissioningStep? - SendCommissioningReadRequest(mDeviceBeingCommissioned, timeout, builder.paths(), builder.size()); + SendCommissioningReadRequest(mDeviceBeingCommissioned, mCommissioningStepTimeout, builder.paths(), builder.size()); } namespace { @@ -3004,9 +3003,10 @@ void DeviceCommissioner::PerformCommissioningStep(DeviceProxy * proxy, Commissio params.GetCompletionStatus().err.AsString()); } - mCommissioningStage = step; - mCommissioningDelegate = delegate; - mDeviceBeingCommissioned = proxy; + mCommissioningStepTimeout = timeout; + mCommissioningStage = step; + mCommissioningDelegate = delegate; + mDeviceBeingCommissioned = proxy; // TODO: Extend timeouts to the DAC and Opcert requests. // TODO(cecille): We probably want something better than this for breadcrumbs. diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 3d4b2fa17201f4..cf22b70d1f487f 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -838,6 +838,7 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, DeviceProxy * mDeviceBeingCommissioned = nullptr; CommissioneeDeviceProxy * mDeviceInPASEEstablishment = nullptr; + Optional mCommissioningStepTimeout; // Note: For multi-interaction steps this is per interaction CommissioningStage mCommissioningStage = CommissioningStage::kSecurePairing; uint8_t mReadCommissioningInfoProgress = 0; // see ContinueReadingCommissioningInfo() From 506f493d6ecec33c772a605f3c65fad386a1c8dc Mon Sep 17 00:00:00 2001 From: Mahesh <92411857+pimpalemahesh@users.noreply.github.com> Date: Thu, 12 Dec 2024 19:55:54 +0530 Subject: [PATCH 31/72] [ESP32]: Update WiFi Scan Network Implementation for New API (#36714) * esp32: Optimize WiFi Scan Handling with Single AP Record API * esp32: add separate ScanResponseIterator for new API changes * esp32: enable ESPScanResponseIterator for compatible IDF versions * esp32: add call for clear ap scan list, used single name for iterator * esp32: move iterator release call outside, code refactoring * esp32: relocate iternum variable for iterator compatibility with older IDF versions * Make SetApData() method private --- .../ESP32/NetworkCommissioningDriver.cpp | 24 ++++++++++ .../ESP32/NetworkCommissioningDriver.h | 46 ++++++++++++++----- 2 files changed, 58 insertions(+), 12 deletions(-) diff --git a/src/platform/ESP32/NetworkCommissioningDriver.cpp b/src/platform/ESP32/NetworkCommissioningDriver.cpp index 9b1280f83d72b6..1ded189218ce82 100644 --- a/src/platform/ESP32/NetworkCommissioningDriver.cpp +++ b/src/platform/ESP32/NetworkCommissioningDriver.cpp @@ -387,6 +387,29 @@ void ESPWiFiDriver::OnScanWiFiNetworkDone() return; } +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 3) + if (CHIP_NO_ERROR == DeviceLayer::SystemLayer().ScheduleLambda([ap_number]() { + ESPScanResponseIterator iter(ap_number); + if (GetInstance().mpScanCallback) + { + GetInstance().mpScanCallback->OnFinished(Status::kSuccess, CharSpan(), &iter); + GetInstance().mpScanCallback = nullptr; + } + else + { + ChipLogError(DeviceLayer, "can't find the ScanCallback function"); + } + iter.Release(); + })) + { + } + else + { + ChipLogError(DeviceLayer, "can't schedule the scan result processing"); + mpScanCallback->OnFinished(Status::kUnknownError, CharSpan(), nullptr); + mpScanCallback = nullptr; + } +#else // Since this is the dynamic memory allocation, restrict it to a configured limit ap_number = std::min(static_cast(CHIP_DEVICE_CONFIG_MAX_SCAN_NETWORKS_RESULTS), ap_number); @@ -430,6 +453,7 @@ void ESPWiFiDriver::OnScanWiFiNetworkDone() mpScanCallback->OnFinished(Status::kUnknownError, CharSpan(), nullptr); mpScanCallback = nullptr; } +#endif // ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 3) } void ESPWiFiDriver::OnNetworkStatusChange() diff --git a/src/platform/ESP32/NetworkCommissioningDriver.h b/src/platform/ESP32/NetworkCommissioningDriver.h index e49a8efd66edd5..f3bbd62a03cff1 100644 --- a/src/platform/ESP32/NetworkCommissioningDriver.h +++ b/src/platform/ESP32/NetworkCommissioningDriver.h @@ -36,34 +36,56 @@ BitFlags ConvertSecurityType(wifi_auth_mode_t authMode); class ESPScanResponseIterator : public Iterator { public: +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 3) + ESPScanResponseIterator(const size_t size) : mSize(size) {} +#else ESPScanResponseIterator(const size_t size, const wifi_ap_record_t * scanResults) : mSize(size), mpScanResults(scanResults) {} +#endif // ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 3) size_t Count() override { return mSize; } + bool Next(WiFiScanResponse & item) override { +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 3) + wifi_ap_record_t ap_record; + VerifyOrReturnValue(esp_wifi_scan_get_ap_record(&ap_record) == ESP_OK, false); + SetApData(item, ap_record); +#else if (mIternum >= mSize) { return false; } - - item.security = ConvertSecurityType(mpScanResults[mIternum].authmode); - static_assert(chip::DeviceLayer::Internal::kMaxWiFiSSIDLength <= UINT8_MAX, "SSID length might not fit in item.ssidLen"); - item.ssidLen = static_cast( - strnlen(reinterpret_cast(mpScanResults[mIternum].ssid), chip::DeviceLayer::Internal::kMaxWiFiSSIDLength)); - item.channel = mpScanResults[mIternum].primary; - item.wiFiBand = chip::DeviceLayer::NetworkCommissioning::WiFiBand::k2g4; - item.rssi = mpScanResults[mIternum].rssi; - memcpy(item.ssid, mpScanResults[mIternum].ssid, item.ssidLen); - memcpy(item.bssid, mpScanResults[mIternum].bssid, 6); - + SetApData(item, mpScanResults[mIternum]); mIternum++; +#endif // ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 3) return true; } - void Release() override {} + + void Release() override + { +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 3) + esp_wifi_clear_ap_list(); +#endif // ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 3) + } private: const size_t mSize; +#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 1, 3) const wifi_ap_record_t * mpScanResults; size_t mIternum = 0; +#endif // ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 1, 3) + + void SetApData(WiFiScanResponse & item, wifi_ap_record_t ap_record) + { + item.security = ConvertSecurityType(ap_record.authmode); + static_assert(chip::DeviceLayer::Internal::kMaxWiFiSSIDLength <= UINT8_MAX, "SSID length might not fit in item.ssidLen"); + item.ssidLen = static_cast( + strnlen(reinterpret_cast(ap_record.ssid), chip::DeviceLayer::Internal::kMaxWiFiSSIDLength)); + item.channel = ap_record.primary; + item.wiFiBand = chip::DeviceLayer::NetworkCommissioning::WiFiBand::k2g4; + item.rssi = ap_record.rssi; + memcpy(item.ssid, ap_record.ssid, item.ssidLen); + memcpy(item.bssid, ap_record.bssid, sizeof(item.bssid)); + } }; class ESPWiFiDriver final : public WiFiDriver From 5a88b607387681c844e2e825ce8649e1a147c4e6 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Thu, 12 Dec 2024 15:58:37 +0100 Subject: [PATCH 32/72] Check fabric-sync application with MCORE-FS tests on CI (#36810) * Check fabric-sync application with MCORE-FS tests on CI * Add test with new fabric-sync for MCORE-FS-1.5 * Use async-friendly sleep --- src/python_testing/TC_MCORE_FS_1_1.py | 15 +++++++++ src/python_testing/TC_MCORE_FS_1_2.py | 25 ++++++++++++-- src/python_testing/TC_MCORE_FS_1_3.py | 23 +++++++++++-- src/python_testing/TC_MCORE_FS_1_4.py | 32 ++++++++++++++++-- src/python_testing/TC_MCORE_FS_1_5.py | 48 +++++++++++++++++++-------- 5 files changed, 121 insertions(+), 22 deletions(-) diff --git a/src/python_testing/TC_MCORE_FS_1_1.py b/src/python_testing/TC_MCORE_FS_1_1.py index 8428a998782601..61c5e6a4d505dd 100755 --- a/src/python_testing/TC_MCORE_FS_1_1.py +++ b/src/python_testing/TC_MCORE_FS_1_1.py @@ -38,6 +38,21 @@ # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # factory-reset: true # quiet: true +# run2: +# app: ${FABRIC_SYNC_APP} +# app-args: --discriminator=1234 +# app-stdin-pipe: dut-fsa-stdin +# 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_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 === import logging diff --git a/src/python_testing/TC_MCORE_FS_1_2.py b/src/python_testing/TC_MCORE_FS_1_2.py index 8fd9c38c2dd6cf..8db130cd6f633d 100644 --- a/src/python_testing/TC_MCORE_FS_1_2.py +++ b/src/python_testing/TC_MCORE_FS_1_2.py @@ -36,6 +36,23 @@ # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # factory-reset: true # quiet: true +# run2: +# app: ${FABRIC_SYNC_APP} +# app-args: --discriminator=1234 +# app-stdin-pipe: dut-fsa-stdin +# script-args: > +# --PICS src/app/tests/suites/certification/ci-pics-values +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --bool-arg unified_fabric_sync_app:true +# --string-arg th_server_app_path:${ALL_CLUSTERS_APP} +# --string-arg 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 === import asyncio @@ -182,8 +199,10 @@ async def test_TC_MCORE_FS_1_2(self): if not self.is_pics_sdk_ci_only: self._ask_for_vendor_commissioning_ux_operation(self.th_server_setup_params) else: - self.dut_fsa_stdin.write( - f"pairing onnetwork 2 {self.th_server_setup_params.passcode}\n") + if self.user_params.get("unified_fabric_sync_app"): + self.dut_fsa_stdin.write(f"app pair-device 2 {self.th_server_setup_params.qr_code}\n") + else: + self.dut_fsa_stdin.write(f"pairing onnetwork 2 {self.th_server_setup_params.passcode}\n") self.dut_fsa_stdin.flush() # Wait for the commissioning to complete. await asyncio.sleep(5) @@ -250,7 +269,7 @@ async def test_TC_MCORE_FS_1_2(self): bridged_info_for_th_server = dut_read[newly_added_endpoint][Clusters.BridgedDeviceBasicInformation] basic_info_attr = Clusters.BasicInformation.Attributes bridged_device_info_attr = Clusters.BridgedDeviceBasicInformation.Attributes - Clusters.BasicInformation.Attributes + asserts.assert_equal(th_server_basic_info[basic_info_attr.VendorName], bridged_info_for_th_server[bridged_device_info_attr.VendorName], "VendorName incorrectly reported by DUT") asserts.assert_equal(th_server_basic_info[basic_info_attr.VendorID], diff --git a/src/python_testing/TC_MCORE_FS_1_3.py b/src/python_testing/TC_MCORE_FS_1_3.py index b4685f175d0fe5..6338d969471fa1 100644 --- a/src/python_testing/TC_MCORE_FS_1_3.py +++ b/src/python_testing/TC_MCORE_FS_1_3.py @@ -40,6 +40,23 @@ # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # factory-reset: true # quiet: true +# run2: +# app: ${FABRIC_SYNC_APP} +# app-args: --discriminator=1234 +# app-stdin-pipe: dut-fsa-stdin +# script-args: > +# --PICS src/app/tests/suites/certification/ci-pics-values +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --bool-arg unified_fabric_sync_app:true +# --string-arg th_server_no_uid_app_path:${LIGHTING_APP_NO_UNIQUE_ID} +# --string-arg 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 === import asyncio @@ -193,8 +210,10 @@ async def test_TC_MCORE_FS_1_3(self): f"If using FabricSync Admin, you may type:\n" f">>> pairing onnetwork {params.setupPinCode}") else: - self.dut_fsa_stdin.write( - f"pairing onnetwork 10 {params.setupPinCode}\n") + if self.user_params.get("unified_fabric_sync_app"): + self.dut_fsa_stdin.write(f"app pair-device 10 {params.setupQRCode}\n") + else: + self.dut_fsa_stdin.write(f"pairing onnetwork 10 {params.setupPinCode}\n") self.dut_fsa_stdin.flush() # Wait for the commissioning to complete. await asyncio.sleep(5) diff --git a/src/python_testing/TC_MCORE_FS_1_4.py b/src/python_testing/TC_MCORE_FS_1_4.py index fb64378750cbf1..e866533f15c36f 100644 --- a/src/python_testing/TC_MCORE_FS_1_4.py +++ b/src/python_testing/TC_MCORE_FS_1_4.py @@ -39,6 +39,25 @@ # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # factory-reset: true # quiet: true +# run2: +# app: ${FABRIC_SYNC_APP} +# app-args: --discriminator=1234 +# app-stdin-pipe: dut-fsa-stdin +# script-args: > +# --PICS src/app/tests/suites/certification/ci-pics-values +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 --passcode 20202021 +# --bool-arg unified_fabric_sync_app:true +# --string-arg th_fsa_app_path:examples/fabric-admin/scripts/fabric-sync-app.py +# --string-arg th_fsa_admin_path:${FABRIC_ADMIN_APP} +# --string-arg th_fsa_bridge_path:${FABRIC_BRIDGE_APP} +# --string-arg th_server_no_uid_app_path:${LIGHTING_APP_NO_UNIQUE_ID} +# --string-arg 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 === import asyncio @@ -322,8 +341,12 @@ async def test_TC_MCORE_FS_1_4(self): f"If using FabricSync Admin, you may type:\n" f">>> fabricsync add-bridge {params.setupPinCode} {self.th_fsa_bridge_port}") else: - self.dut_fsa_stdin.write( - f"fabricsync add-bridge 10 {params.setupPinCode} {self.th_fsa_bridge_address} {self.th_fsa_bridge_port}\n") + if self.user_params.get("unified_fabric_sync_app"): + self.dut_fsa_stdin.write( + f"app add-bridge 10 {params.setupPinCode} {self.th_fsa_bridge_address} {self.th_fsa_bridge_port}\n") + else: + self.dut_fsa_stdin.write( + f"fabricsync add-bridge 10 {params.setupPinCode} {self.th_fsa_bridge_address} {self.th_fsa_bridge_port}\n") self.dut_fsa_stdin.flush() # Wait for the commissioning to complete. await asyncio.sleep(5) @@ -347,7 +370,10 @@ async def test_TC_MCORE_FS_1_4(self): f"If using FabricSync Admin, you may type:\n" f">>> fabricsync sync-device {th_fsa_bridge_th_server_endpoint}") else: - self.dut_fsa_stdin.write(f"fabricsync sync-device {th_fsa_bridge_th_server_endpoint}\n") + if self.user_params.get("unified_fabric_sync_app"): + self.dut_fsa_stdin.write(f"app sync-device {th_fsa_bridge_th_server_endpoint}\n") + else: + self.dut_fsa_stdin.write(f"fabricsync sync-device {th_fsa_bridge_th_server_endpoint}\n") self.dut_fsa_stdin.flush() # Wait for the synchronization to complete. await asyncio.sleep(5) diff --git a/src/python_testing/TC_MCORE_FS_1_5.py b/src/python_testing/TC_MCORE_FS_1_5.py index 2cfcd3ecbfd21e..80760913e6fe65 100755 --- a/src/python_testing/TC_MCORE_FS_1_5.py +++ b/src/python_testing/TC_MCORE_FS_1_5.py @@ -36,6 +36,23 @@ # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # factory-reset: true # quiet: true +# run2: +# app: ${FABRIC_SYNC_APP} +# app-args: --discriminator=1234 +# app-stdin-pipe: dut-fsa-stdin +# script-args: > +# --PICS src/app/tests/suites/certification/ci-pics-values +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --bool-arg unified_fabric_sync_app:true +# --string-arg th_server_app_path:${ALL_CLUSTERS_APP} +# --string-arg 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 === import asyncio @@ -139,17 +156,18 @@ def _ask_for_vendor_commissioning_ux_operation(self, setup_params: SetupParamete f">>> pairing onnetwork 111 {setup_params.passcode}") def steps_TC_MCORE_FS_1_5(self) -> list[TestStep]: - steps = [TestStep(1, "TH subscribes to PartsList attribute of the Descriptor cluster of DUT_FSA endpoint 0."), - TestStep(2, "Follow manufacturer provided instructions to have DUT_FSA commission TH_SERVER"), - TestStep(3, "TH waits up to 30 seconds for subscription report from the PartsList attribute of the Descriptor to contain new endpoint"), - TestStep(4, "TH uses DUT to open commissioning window to TH_SERVER"), - TestStep(5, "TH commissions TH_SERVER"), - TestStep(6, "TH subscribes to AdministratorCommissioning attributes on DUT_FSA for the newly added endpoint identified in step 3"), - TestStep(7, "TH opens commissioning window to TH_SERVER directly (not using DUT)"), - TestStep(8, "TH reads CurrentFabricIndex attributes on OperationalCredentials cluster from TH_SERVER directly (not using DUT_FSA)"), - TestStep(9, "TH reads AdministratorCommissioning from TH_SERVER directly (not using DUT)"), - TestStep(10, "TH waits up to 10 seconds for subscription report from the AdministratorCommissioning attribute (from step 6) to reflect values from previous step")] - return steps + return [ + TestStep(1, "TH subscribes to PartsList attribute of the Descriptor cluster of DUT_FSA endpoint 0."), + TestStep(2, "Follow manufacturer provided instructions to have DUT_FSA commission TH_SERVER"), + TestStep(3, "TH waits up to 30 seconds for subscription report from the PartsList attribute of the Descriptor to contain new endpoint"), + TestStep(4, "TH uses DUT to open commissioning window to TH_SERVER"), + TestStep(5, "TH commissions TH_SERVER"), + TestStep(6, "TH subscribes to AdministratorCommissioning attributes on DUT_FSA for the newly added endpoint identified in step 3"), + TestStep(7, "TH opens commissioning window to TH_SERVER directly (not using DUT)"), + TestStep(8, "TH reads CurrentFabricIndex attributes on OperationalCredentials cluster from TH_SERVER directly (not using DUT_FSA)"), + TestStep(9, "TH reads AdministratorCommissioning from TH_SERVER directly (not using DUT)"), + TestStep(10, "TH waits up to 10 seconds for subscription report from the AdministratorCommissioning attribute (from step 6) to reflect values from previous step"), + ] # This test has some manual steps, so we need a longer timeout. Test typically runs under 1 mins so 3 mins should # be enough time for test to run @@ -189,8 +207,10 @@ async def test_TC_MCORE_FS_1_5(self): if not self.is_pics_sdk_ci_only: self._ask_for_vendor_commissioning_ux_operation(self.th_server_setup_params) else: - self.dut_fsa_stdin.write( - f"pairing onnetwork 2 {self.th_server_setup_params.passcode}\n") + if self.user_params.get("unified_fabric_sync_app"): + self.dut_fsa_stdin.write(f"app pair-device 2 {self.th_server_setup_params.qr_code}\n") + else: + self.dut_fsa_stdin.write(f"pairing onnetwork 2 {self.th_server_setup_params.passcode}\n") self.dut_fsa_stdin.flush() # Wait for the commissioning to complete. await asyncio.sleep(5) @@ -265,7 +285,7 @@ async def test_TC_MCORE_FS_1_5(self): cadmin_attribute_handler = AttributeChangeAccumulator( name=self.default_controller.name, expected_attribute=Clusters.AdministratorCommissioning.Attributes.WindowStatus, output=cadmin_queue) self._cadmin_subscription.SetAttributeUpdateCallback(cadmin_attribute_handler) - time.sleep(1) + await asyncio.sleep(1) self.step(7) await self.default_controller.OpenCommissioningWindow(nodeid=self.th_server_local_nodeid, timeout=180, iteration=1000, discriminator=3840, option=1) From 29d9a2e0ac9ce2f41a939acaf4b76ba4b9cfa490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Thu, 12 Dec 2024 15:58:54 +0100 Subject: [PATCH 33/72] Remove duplicate EnergyTimeUtils.h include in EVSEManufacturerImpl.cpp (#36800) Remove duplicate EnergyTimeUtils.h include in EVSEManufacturerImpl.cpp --- .../energy-evse/src/EVSEManufacturerImpl.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/energy-management-app/energy-management-common/energy-evse/src/EVSEManufacturerImpl.cpp b/examples/energy-management-app/energy-management-common/energy-evse/src/EVSEManufacturerImpl.cpp index 372a6472d2c7a5..c3b7c0af391ef9 100644 --- a/examples/energy-management-app/energy-management-common/energy-evse/src/EVSEManufacturerImpl.cpp +++ b/examples/energy-management-app/energy-management-common/energy-evse/src/EVSEManufacturerImpl.cpp @@ -23,7 +23,6 @@ #include #include -#include #include #include #include From 6706f33c0dec917b3ffe9cde0d5a7cc91d33a5b3 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Thu, 12 Dec 2024 09:59:20 -0500 Subject: [PATCH 34/72] DESC-2.2: print error messages for root node duplicates (#36545) --- src/python_testing/TC_DeviceBasicComposition.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/python_testing/TC_DeviceBasicComposition.py b/src/python_testing/TC_DeviceBasicComposition.py index 71a8b6422ecdd0..161fa3f07c6aee 100644 --- a/src/python_testing/TC_DeviceBasicComposition.py +++ b/src/python_testing/TC_DeviceBasicComposition.py @@ -892,11 +892,14 @@ def test_TC_DESC_2_2(self): 1.2, "For device types with more than one endpoint listed, ensure each of the listed endpoints has a tag attribute and the tag attributes are not the same") problems = find_tag_list_problems(roots, device_types, self.endpoints) - for ep, problem in problems.items(): - location = AttributePathLocation(endpoint_id=ep, cluster_id=Clusters.Descriptor.id, - attribute_id=Clusters.Descriptor.Attributes.TagList.attribute_id) - msg = f'problem on ep {ep}: missing feature = {problem.missing_feature}, missing attribute = {problem.missing_attribute}, duplicates = {problem.duplicates}, same_tags = {problem.same_tag}' - self.record_error(self.get_test_name(), location=location, problem=msg, spec_location="Descriptor TagList") + def record_problems(problems): + for ep, problem in problems.items(): + location = AttributePathLocation(endpoint_id=ep, cluster_id=Clusters.Descriptor.id, + attribute_id=Clusters.Descriptor.Attributes.TagList.attribute_id) + msg = f'problem on ep {ep}: missing feature = {problem.missing_feature}, missing attribute = {problem.missing_attribute}, duplicates = {problem.duplicates}, same_tags = {problem.same_tag}' + self.record_error(self.get_test_name(), location=location, problem=msg, spec_location="Descriptor TagList") + + record_problems(problems) self.print_step(2, "Identify all the direct children of the root node endpoint") root_direct_children = get_direct_children_of_root(self.endpoints) @@ -906,6 +909,7 @@ def test_TC_DESC_2_2(self): self.print_step( 2.2, "For device types with more than one endpoint listed, ensure each of the listed endpoints has a tag attribute and the tag attributes are not the same") root_problems = find_tag_list_problems([0], {0: device_types}, self.endpoints) + record_problems(root_problems) if problems or root_problems: self.fail_current_test("Problems with tags lists") From f3ebc14b44af5e6575fed1ab051cb1d8eaa9af8a Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Thu, 12 Dec 2024 18:59:11 +0100 Subject: [PATCH 35/72] Allow to filter python test case runs from command line (#36781) * Allow to filter python test case runs from command line * Update according to review comment --- scripts/tests/run_python_test.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/tests/run_python_test.py b/scripts/tests/run_python_test.py index 267fb513952437..c67cbf7d75c93d 100755 --- a/scripts/tests/run_python_test.py +++ b/scripts/tests/run_python_test.py @@ -116,9 +116,10 @@ def forward_fifo(path: str, f_out: typing.BinaryIO, stop_event: threading.Event) @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.") +@click.option("--run", type=str, multiple=True, help="Run only the specified test run(s).") def main(app: str, factory_reset: bool, factory_reset_app_only: bool, app_args: str, app_ready_pattern: str, app_stdin_pipe: str, script: str, script_args: str, - script_gdb: bool, quiet: bool, load_from_env): + script_gdb: bool, quiet: bool, load_from_env, run): if load_from_env: reader = MetadataReader(load_from_env) runs = reader.parse_script(script) @@ -141,7 +142,11 @@ def main(app: str, factory_reset: bool, factory_reset_app_only: bool, app_args: "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.") - # Override runs Metadata with the command line arguments + if run: + # Filter runs based on the command line arguments + runs = [r for r in runs if r.run in run] + + # Override runs Metadata with the command line options for run in runs: if factory_reset is not None: run.factory_reset = factory_reset From c55e3abf3d83256ddc0119414d98a6d02ee34133 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Thu, 12 Dec 2024 10:04:04 -0800 Subject: [PATCH 36/72] [Fabric-Sync] Adjust the Subscribe Max Interval to align with test spec (#36806) --- examples/fabric-sync/admin/BridgeSubscription.cpp | 2 +- examples/fabric-sync/admin/DeviceSubscription.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/fabric-sync/admin/BridgeSubscription.cpp b/examples/fabric-sync/admin/BridgeSubscription.cpp index 1df9371ff74dff..a6778a0f0324e6 100644 --- a/examples/fabric-sync/admin/BridgeSubscription.cpp +++ b/examples/fabric-sync/admin/BridgeSubscription.cpp @@ -28,7 +28,7 @@ namespace admin { namespace { constexpr uint16_t kSubscribeMinInterval = 0; -constexpr uint16_t kSubscribeMaxInterval = 60; +constexpr uint16_t kSubscribeMaxInterval = 30; void OnDeviceConnectedWrapper(void * context, Messaging::ExchangeManager & exchangeMgr, const SessionHandle & sessionHandle) { diff --git a/examples/fabric-sync/admin/DeviceSubscription.cpp b/examples/fabric-sync/admin/DeviceSubscription.cpp index 9379df6910f84a..65f65f94cd3bd2 100644 --- a/examples/fabric-sync/admin/DeviceSubscription.cpp +++ b/examples/fabric-sync/admin/DeviceSubscription.cpp @@ -32,6 +32,9 @@ namespace admin { namespace { +constexpr uint16_t kSubscribeMinInterval = 0; +constexpr uint16_t kSubscribeMaxInterval = 10; + void OnDeviceConnectedWrapper(void * context, Messaging::ExchangeManager & exchangeMgr, const SessionHandle & sessionHandle) { reinterpret_cast(context)->OnDeviceConnected(exchangeMgr, sessionHandle); @@ -160,7 +163,9 @@ void DeviceSubscription::OnDeviceConnected(Messaging::ExchangeManager & exchange readParams.mpAttributePathParamsList = readPaths; readParams.mAttributePathParamsListSize = 1; - readParams.mMaxIntervalCeilingSeconds = 5 * 60; + readParams.mMinIntervalFloorSeconds = kSubscribeMinInterval; + readParams.mMaxIntervalCeilingSeconds = kSubscribeMaxInterval; + readParams.mKeepSubscriptions = true; CHIP_ERROR err = mClient->SendRequest(readParams); From 74ff0fb3c7f718f2113bfa13812b337771dece55 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 12 Dec 2024 14:11:06 -0500 Subject: [PATCH 37/72] Remove stale comment from Thermostat XML. (#36820) The relevant fields are nullable in both XML and spec, and the spec issue is long-resolved. --- src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml index d52c730d05ddc9..e2109af8dda365 100644 --- a/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml @@ -208,7 +208,6 @@ limitations under the License. - From 6dc2d3bd48a031126014733b2ad36bf35f6129d8 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Thu, 12 Dec 2024 14:10:50 -0800 Subject: [PATCH 38/72] [Fabric-Admin] Adjust the Subscribe Interval to align with test spec (#36823) --- .../fabric-admin/device_manager/BridgeSubscription.cpp | 2 +- .../fabric-admin/device_manager/DeviceSubscription.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/fabric-admin/device_manager/BridgeSubscription.cpp b/examples/fabric-admin/device_manager/BridgeSubscription.cpp index 1df9371ff74dff..a6778a0f0324e6 100644 --- a/examples/fabric-admin/device_manager/BridgeSubscription.cpp +++ b/examples/fabric-admin/device_manager/BridgeSubscription.cpp @@ -28,7 +28,7 @@ namespace admin { namespace { constexpr uint16_t kSubscribeMinInterval = 0; -constexpr uint16_t kSubscribeMaxInterval = 60; +constexpr uint16_t kSubscribeMaxInterval = 30; void OnDeviceConnectedWrapper(void * context, Messaging::ExchangeManager & exchangeMgr, const SessionHandle & sessionHandle) { diff --git a/examples/fabric-admin/device_manager/DeviceSubscription.cpp b/examples/fabric-admin/device_manager/DeviceSubscription.cpp index 996656a0de2bdc..d82dbc7bde3a09 100644 --- a/examples/fabric-admin/device_manager/DeviceSubscription.cpp +++ b/examples/fabric-admin/device_manager/DeviceSubscription.cpp @@ -37,6 +37,9 @@ namespace admin { namespace { +constexpr uint16_t kSubscribeMinInterval = 0; +constexpr uint16_t kSubscribeMaxInterval = 10; + void OnDeviceConnectedWrapper(void * context, Messaging::ExchangeManager & exchangeMgr, const SessionHandle & sessionHandle) { reinterpret_cast(context)->OnDeviceConnected(exchangeMgr, sessionHandle); @@ -162,7 +165,9 @@ void DeviceSubscription::OnDeviceConnected(Messaging::ExchangeManager & exchange readParams.mpAttributePathParamsList = readPaths; readParams.mAttributePathParamsListSize = 1; - readParams.mMaxIntervalCeilingSeconds = 5 * 60; + readParams.mMinIntervalFloorSeconds = kSubscribeMinInterval; + readParams.mMaxIntervalCeilingSeconds = kSubscribeMaxInterval; + readParams.mKeepSubscriptions = true; CHIP_ERROR err = mClient->SendRequest(readParams); From c3071f721cb6cd0b2b52e233c41ffafc46469cff Mon Sep 17 00:00:00 2001 From: yunhanw-google Date: Thu, 12 Dec 2024 14:57:36 -0800 Subject: [PATCH 39/72] [Android] Unify AndroidDeviceControllerWrapper::Shutdown() (#36811) Fix AndroidDeviceControllerWrapper::Shutdown() and make destructor call this shutdown, and further create mInitialized state to guarantee shutdown proceudre can be executed only once --- .../java/AndroidDeviceControllerWrapper.cpp | 56 ++++++++++--------- .../java/AndroidDeviceControllerWrapper.h | 2 +- 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index d343765747ea77..a08d3993362e63 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -49,32 +49,7 @@ using namespace TLV; AndroidDeviceControllerWrapper::~AndroidDeviceControllerWrapper() { - getICDClientStorage()->Shutdown(); - mController->Shutdown(); - - if (mKeypairBridge != nullptr) - { - chip::Platform::Delete(mKeypairBridge); - mKeypairBridge = nullptr; - } - - if (mDeviceAttestationDelegateBridge != nullptr) - { - delete mDeviceAttestationDelegateBridge; - mDeviceAttestationDelegateBridge = nullptr; - } - - if (mDeviceAttestationVerifier != nullptr) - { - delete mDeviceAttestationVerifier; - mDeviceAttestationVerifier = nullptr; - } - - if (mAttestationTrustStoreBridge != nullptr) - { - delete mAttestationTrustStoreBridge; - mAttestationTrustStoreBridge = nullptr; - } + Shutdown(); } void AndroidDeviceControllerWrapper::SetJavaObjectRef(JavaVM * vm, jobject obj) @@ -412,14 +387,41 @@ AndroidDeviceControllerWrapper * AndroidDeviceControllerWrapper::AllocateNew( { return nullptr; } - + wrapper->mIsInitialized = true; return wrapper.release(); } void AndroidDeviceControllerWrapper::Shutdown() { + VerifyOrReturn(mIsInitialized); + getICDClientStorage()->Shutdown(); mController->Shutdown(); DeviceControllerFactory::GetInstance().Shutdown(); + + if (mKeypairBridge != nullptr) + { + chip::Platform::Delete(mKeypairBridge); + mKeypairBridge = nullptr; + } + + if (mDeviceAttestationDelegateBridge != nullptr) + { + delete mDeviceAttestationDelegateBridge; + mDeviceAttestationDelegateBridge = nullptr; + } + + if (mDeviceAttestationVerifier != nullptr) + { + delete mDeviceAttestationVerifier; + mDeviceAttestationVerifier = nullptr; + } + + if (mAttestationTrustStoreBridge != nullptr) + { + delete mAttestationTrustStoreBridge; + mAttestationTrustStoreBridge = nullptr; + } + mIsInitialized = false; } CHIP_ERROR AndroidDeviceControllerWrapper::ApplyNetworkCredentials(chip::Controller::CommissioningParameters & params, diff --git a/src/controller/java/AndroidDeviceControllerWrapper.h b/src/controller/java/AndroidDeviceControllerWrapper.h index 93374a1e0f1795..027568ffb978e0 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.h +++ b/src/controller/java/AndroidDeviceControllerWrapper.h @@ -274,7 +274,7 @@ class AndroidDeviceControllerWrapper : public chip::Controller::DevicePairingDel uint32_t mActiveModeDuration = 0; uint16_t mActiveModeThreshold = 0; chip::Controller::CommissioningParameters mCommissioningParameter; - + bool mIsInitialized = false; AndroidDeviceControllerWrapper(ChipDeviceControllerPtr controller, #ifdef JAVA_MATTER_CONTROLLER_TEST ExampleOperationalCredentialsIssuerPtr opCredsIssuer From 07f755fdc76249ea229bfd7ab9491cc57cf9e1f2 Mon Sep 17 00:00:00 2001 From: Jeff Tung <100387939+jtung-apple@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:10:13 -0800 Subject: [PATCH 40/72] [Darwin] Unstored attributes should be flushed to storage on shutdown (#36791) * [Darwin] Unstored attributes should be flushed to storage on shutdown * Added unit test * Restyled fix * Fixed unit test issue * Update src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h Co-authored-by: Boris Zbarsky * Restyled by whitespace * More unit test fix * Restyled fix * Fix typo from previous suggestion. * Clarify comment for flushing write operations --------- Co-authored-by: Justin Wood Co-authored-by: Boris Zbarsky Co-authored-by: Restyled.io --- .../CHIP/MTRDeviceControllerDataStore.h | 10 ++ .../CHIP/MTRDeviceControllerDataStore.mm | 9 ++ .../CHIP/MTRDeviceController_Concrete.mm | 8 ++ .../Framework/CHIP/MTRDevice_Concrete.mm | 3 + .../CHIPTests/MTRPerControllerStorageTests.m | 123 ++++++++++++++++++ .../TestHelpers/MTRTestPerControllerStorage.h | 3 + .../TestHelpers/MTRTestPerControllerStorage.m | 85 +++++++----- 7 files changed, 207 insertions(+), 34 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h index 508092b40fa613..943cd4c2cfb33c 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h @@ -93,6 +93,16 @@ typedef void (^MTRDeviceControllerDataStoreClusterDataHandler)(NSDictionary *)getStoredDeviceDataForNodeID:(NSNumber *)nodeID; - (void)storeDeviceData:(NSDictionary *)data forNodeID:(NSNumber *)nodeID; +/** + * Mechanism for an API client to perform a block after previous async operations (writes) on the storage queue have executed. + * + * This should be used only when something really needs to wait for the asynchronous writes + * to complete and can't proceed until they have. + * + * If no block is passed in, then the method returns after having synchronously flushed the queue. + */ +- (void)synchronouslyPerformBlock:(void (^_Nullable)(void))block; + @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm index 8d57a5b0a1927d..a874e26f44f428 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm @@ -1169,6 +1169,15 @@ - (void)storeDeviceData:(NSDictionary *)data forNodeID:(NSNumber }); } +- (void)synchronouslyPerformBlock:(void (^_Nullable)(void))block +{ + dispatch_sync(_storageDelegateQueue, ^{ + if (block) { + block(); + } + }); +} + @end @implementation MTRCASESessionResumptionInfo diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm index 99398867ccfa68..b27844425baa50 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm @@ -449,6 +449,14 @@ - (void)cleanupAfterStartup for (MTRDevice * device in devices) { [device invalidate]; } + + // Since MTRDevice invalidate may issue asynchronous writes to storage, perform a + // block synchronously on the storage delegate queue so the async write operations + // get to run, in case the API client tears down the storage backend afterwards. + [self.controllerDataStore synchronouslyPerformBlock:^{ + MTR_LOG("%@ Finished flushing data write operations", self); + }]; + [self stopBrowseForCommissionables]; [_factory controllerShuttingDown:self]; diff --git a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm index 1d0a113553666a..996e41ff12cf2d 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm +++ b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm @@ -850,6 +850,9 @@ - (void)invalidate os_unfair_lock_lock(&self->_lock); + // Flush unstored attributes if any + [self _persistClusterData]; + _state = MTRDeviceStateUnknown; // Make sure we don't try to resubscribe if we have a pending resubscribe diff --git a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m index 8270fe8593c98b..8a4b87ccb0c0a0 100644 --- a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m +++ b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m @@ -1692,6 +1692,7 @@ - (void)doDataStoreMTRDeviceTestWithStorageDelegate:(id *> * attributeReport = @[ @{ + MTRAttributePathKey : [MTRAttributePath attributePathWithEndpointID:@(0) clusterID:@(1) attributeID:@(1)], + MTRDataKey : @ { + MTRDataVersionKey : @(1), + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(1), + } + } ]; + + // Inject first report as priming report, which gets persisted immediately + [device unitTestInjectAttributeReport:attributeReport fromSubscription:YES]; + + // No additional entries immediately after injected report + XCTAssertEqual(storageDelegate.count, baseStorageKeyCount); + + sleep(1); + + // Verify priming report persisted before hitting storage delay + XCTAssertGreaterThan(storageDelegate.count, baseStorageKeyCount); + // Now set the base count to the after-priming number + baseStorageKeyCount = storageDelegate.count; + + NSArray *> * attributeReport2 = @[ @{ + MTRAttributePathKey : [MTRAttributePath attributePathWithEndpointID:@(0) clusterID:@(2) attributeID:@(2)], + MTRDataKey : @ { + MTRDataVersionKey : @(2), + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(2), + } + } ]; + + // Inject second report with different cluster + [device unitTestInjectAttributeReport:attributeReport2 fromSubscription:YES]; + + sleep(1); + + // No additional entries a second after report - under storage delay + XCTAssertEqual(storageDelegate.count, baseStorageKeyCount); + + // Immediately shut down controller and force flush to storage + [controller shutdown]; + XCTAssertFalse([controller isRunning]); + + // Make sure there are more than base count entries + XCTAssertGreaterThan(storageDelegate.count, baseStorageKeyCount); + + // Now restart controller to decommission the device + controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storageDelegate + error:&error + certificateIssuer:&certificateIssuer + storageBehaviorConfiguration:storageBehaviorConfiguration]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID); + + // Reset our commissionee. + __auto_type * baseDevice = [MTRBaseDevice deviceWithNodeID:deviceID controller:controller]; + ResetCommissionee(baseDevice, queue, self, kTimeoutInSeconds); + + [controller shutdown]; +} + // TODO: This might want to go in a separate test file, with some shared setup // across multiple tests, maybe. Would need to factor out // startControllerWithRootKeys into a test helper. diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.h b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.h index b02bff9c01a46b..cc9b30258528c5 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.h +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.h @@ -38,6 +38,9 @@ NS_ASSUME_NONNULL_BEGIN removeValueForKey:(NSString *)key securityLevel:(MTRStorageSecurityLevel)securityLevel sharingType:(MTRStorageSharingType)sharingType; + +// For testing - direct access to the current count of keys in storage +@property (nonatomic, readonly) NSUInteger count; @end @interface MTRTestPerControllerStorageWithBulkReadWrite : MTRTestPerControllerStorage diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.m b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.m index f0bce87bc47af1..76ce8f2ac30500 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.m +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.m @@ -40,19 +40,21 @@ - (instancetype)initWithControllerID:(NSUUID *)controllerID securityLevel:(MTRStorageSecurityLevel)securityLevel sharingType:(MTRStorageSharingType)sharingType { - XCTAssertEqualObjects(_controllerID, controller.uniqueIdentifier); + @synchronized(self) { + XCTAssertEqualObjects(_controllerID, controller.uniqueIdentifier); - __auto_type * data = self.storage[key]; - if (data == nil) { - return data; - } + __auto_type * data = self.storage[key]; + if (data == nil) { + return data; + } - NSError * error; - id value = [NSKeyedUnarchiver unarchivedObjectOfClasses:MTRDeviceControllerStorageClasses() fromData:data error:&error]; - XCTAssertNil(error); - XCTAssertNotNil(data); + NSError * error; + id value = [NSKeyedUnarchiver unarchivedObjectOfClasses:MTRDeviceControllerStorageClasses() fromData:data error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(data); - return value; + return value; + } } - (BOOL)controller:(MTRDeviceController *)controller @@ -61,15 +63,17 @@ - (BOOL)controller:(MTRDeviceController *)controller securityLevel:(MTRStorageSecurityLevel)securityLevel sharingType:(MTRStorageSharingType)sharingType { - XCTAssertEqualObjects(_controllerID, controller.uniqueIdentifier); + @synchronized(self) { + XCTAssertEqualObjects(_controllerID, controller.uniqueIdentifier); - NSError * error; - NSData * data = [NSKeyedArchiver archivedDataWithRootObject:value requiringSecureCoding:YES error:&error]; - XCTAssertNil(error); - XCTAssertNotNil(data); + NSError * error; + NSData * data = [NSKeyedArchiver archivedDataWithRootObject:value requiringSecureCoding:YES error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(data); - self.storage[key] = data; - return YES; + self.storage[key] = data; + return YES; + } } - (BOOL)controller:(MTRDeviceController *)controller @@ -77,9 +81,18 @@ - (BOOL)controller:(MTRDeviceController *)controller securityLevel:(MTRStorageSecurityLevel)securityLevel sharingType:(MTRStorageSharingType)sharingType { - XCTAssertEqualObjects(_controllerID, controller.uniqueIdentifier); - self.storage[key] = nil; - return YES; + @synchronized(self) { + XCTAssertEqualObjects(_controllerID, controller.uniqueIdentifier); + self.storage[key] = nil; + return YES; + } +} + +- (NSUInteger)count +{ + @synchronized(self) { + return self.storage.count; + } } @end @@ -88,29 +101,33 @@ @implementation MTRTestPerControllerStorageWithBulkReadWrite - (NSDictionary> *)valuesForController:(MTRDeviceController *)controller securityLevel:(MTRStorageSecurityLevel)securityLevel sharingType:(MTRStorageSharingType)sharingType { - XCTAssertEqualObjects(self.controllerID, controller.uniqueIdentifier); + @synchronized(self) { + XCTAssertEqualObjects(self.controllerID, controller.uniqueIdentifier); - if (!self.storage.count) { - return nil; - } + if (!self.storage.count) { + return nil; + } - NSMutableDictionary * valuesToReturn = [NSMutableDictionary dictionary]; - for (NSString * key in self.storage) { - valuesToReturn[key] = [self controller:controller valueForKey:key securityLevel:securityLevel sharingType:sharingType]; - } + NSMutableDictionary * valuesToReturn = [NSMutableDictionary dictionary]; + for (NSString * key in self.storage) { + valuesToReturn[key] = [self controller:controller valueForKey:key securityLevel:securityLevel sharingType:sharingType]; + } - return valuesToReturn; + return valuesToReturn; + } } - (BOOL)controller:(MTRDeviceController *)controller storeValues:(NSDictionary> *)values securityLevel:(MTRStorageSecurityLevel)securityLevel sharingType:(MTRStorageSharingType)sharingType { - XCTAssertEqualObjects(self.controllerID, controller.uniqueIdentifier); + @synchronized(self) { + XCTAssertEqualObjects(self.controllerID, controller.uniqueIdentifier); - for (NSString * key in values) { - [self controller:controller storeValue:values[key] forKey:key securityLevel:securityLevel sharingType:sharingType]; - } + for (NSString * key in values) { + [self controller:controller storeValue:values[key] forKey:key securityLevel:securityLevel sharingType:sharingType]; + } - return YES; + return YES; + } } @end From 728e3e3c436f10ea29aab43c60964c71156a1a95 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 12 Dec 2024 21:01:33 -0500 Subject: [PATCH 41/72] Remove provisional annotations from derived cluster inherited enum values. (#36819) Looks like having the base enum just inlined in the derived cluster is here to stay, at least in terms of what API consumers want in terms of ergonomics. So just go ahead and expose it. --- .../CHIP/templates/availability.yaml | 206 +++++++++--------- .../CHIP/zap-generated/MTRBaseClusters.h | 176 +++++++-------- 2 files changed, 185 insertions(+), 197 deletions(-) diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 3885ae5d988a1d..5267131218300a 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -9874,44 +9874,6 @@ - RequiredTCNotAccepted - TCAcknowledgementsNotReceived - TCMinVersionNotMet - RVCCleanMode: - # Not clear whether these will stay in the XML - ModeTag: - - Auto - - Quick - - Quiet - - LowNoise - - LowEnergy - - Min - - Max - - Night - - Day - - Vacation - RVCOperationalState: - # Not clear whether these will stay in the XML - ErrorStateEnum: - - NoError - - UnableToStartOrResume - - UnableToCompleteOperation - - CommandInvalidInState - OperationalStateEnum: - - Stopped - - Running - - Paused - - Error - RVCRunMode: - # Not clear whether these will stay in the XML - ModeTag: - - Auto - - Quick - - Quiet - - LowNoise - - LowEnergy - - Vacation - - Min - - Max - - Night - - Day bitmaps: AccessControl: # Targeting 1.4 @@ -10370,11 +10332,24 @@ - NumberOfRinsesEnum LaundryWasherMode: - ModeTag + OvenCavityOperationalState: + - ErrorStateEnum + - OperationalStateEnum RefrigeratorAndTemperatureControlledCabinetMode: - ModeTag enum values: DishwasherMode: ModeTag: + - Auto + - Quick + - Quiet + - LowNoise + - LowEnergy + - Vacation + - Min + - Max + - Night + - Day - Normal - Heavy - Light @@ -10400,16 +10375,57 @@ - Max LaundryWasherMode: ModeTag: + - Auto + - Quick + - Quiet + - LowNoise + - LowEnergy + - Vacation + - Min + - Max + - Night + - Day - Normal - Delicate - Heavy - Whites MicrowaveOvenMode: ModeTag: + - Auto + - Quick + - Quiet + - LowNoise + - LowEnergy + - Vacation + - Min + - Max + - Night + - Day - Normal - Defrost + OvenCavityOperationalState: + ErrorStateEnum: + - NoError + - UnableToStartOrResume + - UnableToCompleteOperation + - CommandInvalidInState + OperationalStateEnum: + - Stopped + - Running + - Paused + - Error OvenMode: ModeTag: + - Auto + - Quick + - Quiet + - LowNoise + - LowEnergy + - Vacation + - Min + - Max + - Night + - Day - Bake - Convection - Grill @@ -10422,10 +10438,53 @@ - Steam RefrigeratorAndTemperatureControlledCabinetMode: ModeTag: + - Auto + - Quick + - Quiet + - LowNoise + - LowEnergy + - Vacation + - Min + - Max + - Night + - Day - RapidCool - RapidFreeze + RVCCleanMode: + ModeTag: + - Auto + - Quick + - Quiet + - LowNoise + - LowEnergy + - Min + - Max + - Night + - Day + - Vacation + RVCOperationalState: + ErrorStateEnum: + - NoError + - UnableToStartOrResume + - UnableToCompleteOperation + - CommandInvalidInState + OperationalStateEnum: + - Stopped + - Running + - Paused + - Error RVCRunMode: ModeTag: + - Auto + - Quick + - Quiet + - LowNoise + - LowEnergy + - Vacation + - Min + - Max + - Night + - Day - Mapping bitmaps: DishwasherAlarm: @@ -10503,77 +10562,6 @@ SetCookingParameters: # wattSettingIndex is provisional because WATTS is provisional in Matter 1.4 - wattSettingIndex - enums: - OvenCavityOperationalState: - # Not clear whether these will stay in the XML - - ErrorStateEnum - - OperationalStateEnum - enum values: - DishwasherMode: - # Not clear whether these will stay in the XML - ModeTag: - - Auto - - Quick - - Quiet - - LowNoise - - LowEnergy - - Vacation - - Min - - Max - - Night - - Day - LaundryWasherMode: - # Not clear whether these will stay in the XML - ModeTag: - - Auto - - Quick - - Quiet - - LowNoise - - LowEnergy - - Vacation - - Min - - Max - - Night - - Day - MicrowaveOvenMode: - # Not clear whether these will stay in the XML - ModeTag: - - Auto - - Quick - - Quiet - - LowNoise - - LowEnergy - - Vacation - - Min - - Max - - Night - - Day - OvenMode: - # Not clear whether these will stay in the XML - ModeTag: - - Auto - - Quick - - Quiet - - LowNoise - - LowEnergy - - Vacation - - Min - - Max - - Night - - Day - RefrigeratorAndTemperatureControlledCabinetMode: - # Not clear whether these will stay in the XML - ModeTag: - - Auto - - Quick - - Quiet - - LowNoise - - LowEnergy - - Vacation - - Min - - Max - - Night - - Day bitmap values: DishwasherAlarm: AlarmBitmap: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index cf7924b9b5d70d..3b73ca8805a296 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -17238,30 +17238,30 @@ typedef NS_OPTIONS(uint32_t, MTRTimerFeature) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTROvenCavityOperationalStateErrorState) { - MTROvenCavityOperationalStateErrorStateNoError MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTROvenCavityOperationalStateErrorStateUnableToStartOrResume MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTROvenCavityOperationalStateErrorStateUnableToCompleteOperation MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTROvenCavityOperationalStateErrorStateCommandInvalidInState MTR_PROVISIONALLY_AVAILABLE = 0x03, -} MTR_PROVISIONALLY_AVAILABLE; + MTROvenCavityOperationalStateErrorStateNoError MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00, + MTROvenCavityOperationalStateErrorStateUnableToStartOrResume MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x01, + MTROvenCavityOperationalStateErrorStateUnableToCompleteOperation MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x02, + MTROvenCavityOperationalStateErrorStateCommandInvalidInState MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x03, +} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_ENUM(uint8_t, MTROvenCavityOperationalStateOperationalState) { - MTROvenCavityOperationalStateOperationalStateStopped MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTROvenCavityOperationalStateOperationalStateRunning MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTROvenCavityOperationalStateOperationalStatePaused MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTROvenCavityOperationalStateOperationalStateError MTR_PROVISIONALLY_AVAILABLE = 0x03, -} MTR_PROVISIONALLY_AVAILABLE; + MTROvenCavityOperationalStateOperationalStateStopped MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00, + MTROvenCavityOperationalStateOperationalStateRunning MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x01, + MTROvenCavityOperationalStateOperationalStatePaused MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x02, + MTROvenCavityOperationalStateOperationalStateError MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x03, +} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_ENUM(uint16_t, MTROvenModeModeTag) { - MTROvenModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTROvenModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTROvenModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTROvenModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTROvenModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTROvenModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTROvenModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTROvenModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTROvenModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTROvenModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTROvenModeModeTagAuto MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00, + MTROvenModeModeTagQuick MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x01, + MTROvenModeModeTagQuiet MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x02, + MTROvenModeModeTagLowNoise MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x03, + MTROvenModeModeTagLowEnergy MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x04, + MTROvenModeModeTagVacation MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x05, + MTROvenModeModeTagMin MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x06, + MTROvenModeModeTagMax MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x07, + MTROvenModeModeTagNight MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x08, + MTROvenModeModeTagDay MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x09, MTROvenModeModeTagBake MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4000, MTROvenModeModeTagConvection MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4001, MTROvenModeModeTagGrill MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4002, @@ -17286,16 +17286,16 @@ typedef NS_OPTIONS(uint32_t, MTRModeSelectFeature) { } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint16_t, MTRLaundryWasherModeModeTag) { - MTRLaundryWasherModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRLaundryWasherModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRLaundryWasherModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRLaundryWasherModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRLaundryWasherModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRLaundryWasherModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRLaundryWasherModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRLaundryWasherModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRLaundryWasherModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRLaundryWasherModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRLaundryWasherModeModeTagAuto MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00, + MTRLaundryWasherModeModeTagQuick MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x01, + MTRLaundryWasherModeModeTagQuiet MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x02, + MTRLaundryWasherModeModeTagLowNoise MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x03, + MTRLaundryWasherModeModeTagLowEnergy MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x04, + MTRLaundryWasherModeModeTagVacation MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x05, + MTRLaundryWasherModeModeTagMin MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x06, + MTRLaundryWasherModeModeTagMax MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x07, + MTRLaundryWasherModeModeTagNight MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x08, + MTRLaundryWasherModeModeTagDay MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x09, MTRLaundryWasherModeModeTagNormal MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4000, MTRLaundryWasherModeModeTagDelicate MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4001, MTRLaundryWasherModeModeTagHeavy MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4002, @@ -17303,16 +17303,16 @@ typedef NS_ENUM(uint16_t, MTRLaundryWasherModeModeTag) { } MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_ENUM(uint16_t, MTRRefrigeratorAndTemperatureControlledCabinetModeModeTag) { - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagAuto MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagQuick MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x01, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagQuiet MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x02, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagLowNoise MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x03, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagLowEnergy MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x04, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagVacation MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x05, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagMin MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x06, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagMax MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x07, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagNight MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x08, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagDay MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x09, MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagRapidCool MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4000, MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagRapidFreeze MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4001, } MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @@ -17330,16 +17330,16 @@ typedef NS_OPTIONS(uint32_t, MTRLaundryWasherControlsFeature) { } MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_ENUM(uint16_t, MTRRVCRunModeModeTag) { - MTRRVCRunModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRRVCRunModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRRVCRunModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRRVCRunModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRRVCRunModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRRVCRunModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRRVCRunModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRRVCRunModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRRVCRunModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRRVCRunModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRRVCRunModeModeTagAuto MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00, + MTRRVCRunModeModeTagQuick MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x01, + MTRRVCRunModeModeTagQuiet MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x02, + MTRRVCRunModeModeTagLowNoise MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x03, + MTRRVCRunModeModeTagLowEnergy MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x04, + MTRRVCRunModeModeTagVacation MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x05, + MTRRVCRunModeModeTagMin MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x06, + MTRRVCRunModeModeTagMax MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x07, + MTRRVCRunModeModeTagNight MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x08, + MTRRVCRunModeModeTagDay MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x09, MTRRVCRunModeModeTagIdle MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4000, MTRRVCRunModeModeTagCleaning MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4001, MTRRVCRunModeModeTagMapping MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4002, @@ -17361,16 +17361,16 @@ typedef NS_OPTIONS(uint32_t, MTRRVCRunModeFeature) { } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); typedef NS_ENUM(uint16_t, MTRRVCCleanModeModeTag) { - MTRRVCCleanModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRRVCCleanModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRRVCCleanModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRRVCCleanModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRRVCCleanModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRRVCCleanModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRRVCCleanModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRRVCCleanModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRRVCCleanModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRRVCCleanModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRRVCCleanModeModeTagAuto MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00, + MTRRVCCleanModeModeTagQuick MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x01, + MTRRVCCleanModeModeTagQuiet MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x02, + MTRRVCCleanModeModeTagLowNoise MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x03, + MTRRVCCleanModeModeTagLowEnergy MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x04, + MTRRVCCleanModeModeTagVacation MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x05, + MTRRVCCleanModeModeTagMin MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x06, + MTRRVCCleanModeModeTagMax MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x07, + MTRRVCCleanModeModeTagNight MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x08, + MTRRVCCleanModeModeTagDay MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x09, MTRRVCCleanModeModeTagDeepClean MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4000, MTRRVCCleanModeModeTagVacuum MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4001, MTRRVCCleanModeModeTagMop MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4002, @@ -17395,16 +17395,16 @@ typedef NS_OPTIONS(uint32_t, MTRRefrigeratorAlarmAlarmBitmap) { } MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_ENUM(uint16_t, MTRDishwasherModeModeTag) { - MTRDishwasherModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDishwasherModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDishwasherModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRDishwasherModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRDishwasherModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRDishwasherModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRDishwasherModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRDishwasherModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRDishwasherModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRDishwasherModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRDishwasherModeModeTagAuto MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00, + MTRDishwasherModeModeTagQuick MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x01, + MTRDishwasherModeModeTagQuiet MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x02, + MTRDishwasherModeModeTagLowNoise MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x03, + MTRDishwasherModeModeTagLowEnergy MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x04, + MTRDishwasherModeModeTagVacation MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x05, + MTRDishwasherModeModeTagMin MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x06, + MTRDishwasherModeModeTagMax MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x07, + MTRDishwasherModeModeTagNight MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x08, + MTRDishwasherModeModeTagDay MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x09, MTRDishwasherModeModeTagNormal MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4000, MTRDishwasherModeModeTagHeavy MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4001, MTRDishwasherModeModeTagLight MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4002, @@ -17487,16 +17487,16 @@ typedef NS_OPTIONS(uint32_t, MTRDishwasherAlarmFeature) { } MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); typedef NS_ENUM(uint16_t, MTRMicrowaveOvenModeModeTag) { - MTRMicrowaveOvenModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRMicrowaveOvenModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRMicrowaveOvenModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRMicrowaveOvenModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRMicrowaveOvenModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRMicrowaveOvenModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRMicrowaveOvenModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRMicrowaveOvenModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRMicrowaveOvenModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRMicrowaveOvenModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRMicrowaveOvenModeModeTagAuto MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00, + MTRMicrowaveOvenModeModeTagQuick MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x01, + MTRMicrowaveOvenModeModeTagQuiet MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x02, + MTRMicrowaveOvenModeModeTagLowNoise MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x03, + MTRMicrowaveOvenModeModeTagLowEnergy MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x04, + MTRMicrowaveOvenModeModeTagVacation MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x05, + MTRMicrowaveOvenModeModeTagMin MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x06, + MTRMicrowaveOvenModeModeTagMax MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x07, + MTRMicrowaveOvenModeModeTagNight MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x08, + MTRMicrowaveOvenModeModeTagDay MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x09, MTRMicrowaveOvenModeModeTagNormal MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4000, MTRMicrowaveOvenModeModeTagDefrost MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x4001, } MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)); @@ -17522,10 +17522,10 @@ typedef NS_ENUM(uint8_t, MTROperationalState) { } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); typedef NS_ENUM(uint8_t, MTRRVCOperationalStateErrorState) { - MTRRVCOperationalStateErrorStateNoError MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRRVCOperationalStateErrorStateUnableToStartOrResume MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRRVCOperationalStateErrorStateUnableToCompleteOperation MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRRVCOperationalStateErrorStateCommandInvalidInState MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRRVCOperationalStateErrorStateNoError MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00, + MTRRVCOperationalStateErrorStateUnableToStartOrResume MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x01, + MTRRVCOperationalStateErrorStateUnableToCompleteOperation MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x02, + MTRRVCOperationalStateErrorStateCommandInvalidInState MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x03, MTRRVCOperationalStateErrorStateFailedToFindChargingDock MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x40, MTRRVCOperationalStateErrorStateStuck MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x41, MTRRVCOperationalStateErrorStateDustBinMissing MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x42, @@ -17537,10 +17537,10 @@ typedef NS_ENUM(uint8_t, MTRRVCOperationalStateErrorState) { } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); typedef NS_ENUM(uint8_t, MTRRVCOperationalStateOperationalState) { - MTRRVCOperationalStateOperationalStateStopped MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRRVCOperationalStateOperationalStateRunning MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRRVCOperationalStateOperationalStatePaused MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRRVCOperationalStateOperationalStateError MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRRVCOperationalStateOperationalStateStopped MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00, + MTRRVCOperationalStateOperationalStateRunning MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x01, + MTRRVCOperationalStateOperationalStatePaused MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x02, + MTRRVCOperationalStateOperationalStateError MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x03, MTRRVCOperationalStateOperationalStateSeekingCharger MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x40, MTRRVCOperationalStateOperationalStateCharging MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x41, MTRRVCOperationalStateOperationalStateDocked MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x42, From 8ea6b8d435dc26ba1a2c513c23540d42fdf952e4 Mon Sep 17 00:00:00 2001 From: Sergio Soares Date: Thu, 12 Dec 2024 23:02:42 -0500 Subject: [PATCH 42/72] Update Code Coverage Report and Fix webapp instructions (#36822) * Fix webapp config for code coverage tool This PR fixes the cloud deployment config so we can upload code coverage again. * Update readme with extra instructions * Restyled by prettier-markdown * Attempt to fix misspell CI error * Another attempt. Pyspelling CI checker doesn't like Yufeng's name. * Update title to "Matter SDK Coverage Report" and add SHA * Restyled by shfmt --------- Co-authored-by: Restyled.io --- integrations/appengine/README.md | 40 +++++++++++++++++++++-- integrations/appengine/webapp_config.yaml | 4 +-- scripts/build_coverage.sh | 2 +- 3 files changed, 40 insertions(+), 6 deletions(-) diff --git a/integrations/appengine/README.md b/integrations/appengine/README.md index 45ecbe50d585eb..2eea9c1dc21daf 100644 --- a/integrations/appengine/README.md +++ b/integrations/appengine/README.md @@ -1,4 +1,4 @@ -## Deploy Static Website on App Engine +## Deploy Static Website on App Engine for The Matter SDK Coverage Report ### Setup google cloud integration @@ -30,7 +30,43 @@ settings of your App Engine application. Directory `out/coverage/coverage` contains the coverage report files, such as HTML, CSS, images, and JavaScript. +Deploying your generated report: + ``` cd out/coverage/coverage -gcloud app deploy ../../../integrations/appengine/webapp_config.yaml +gcloud app deploy webapp_config.yaml --project matter-build-automation +``` + +The output should look like: + +``` +Services to deploy: + +descriptor: [/usr/local/google/home//connectedhomeip/out/coverage/coverage/webapp_config.yaml] +source: [/usr/local/google/home//connectedhomeip/out/coverage/coverage] +target project: [matter-build-automation] +target service: [default] +target version: [20241212t175429] +target url: [https://matter-build-automation.ue.r.appspot.com] +target service account: [matter-build-automation@appspot.gserviceaccount.com] + + +Do you want to continue (Y/n)? Y + +Beginning deployment of service [default]... +╔════════════════════════════════════════════════════════════╗ +╠═ Uploading 0 files to Google Cloud Storage ═╣ +╚════════════════════════════════════════════════════════════╝ +File upload done. +Updating service [default]...done. +Setting traffic split for service [default]...done. +Deployed service [default] to [https://matter-build-automation.ue.r.appspot.com] + +You can stream logs from the command line by running: + $ gcloud app logs tail -s default + +To view your application in the web browser run: + $ gcloud app browse --project=matter-build-automation ``` + +If you run into permission issues, reach out to a team member from Google. diff --git a/integrations/appengine/webapp_config.yaml b/integrations/appengine/webapp_config.yaml index 839b6aa94d671b..f27ad7d68b8663 100644 --- a/integrations/appengine/webapp_config.yaml +++ b/integrations/appengine/webapp_config.yaml @@ -1,6 +1,4 @@ -runtime: python27 -api_version: 1 -threadsafe: true +runtime: python39 handlers: - url: / static_files: html/index.html diff --git a/scripts/build_coverage.sh b/scripts/build_coverage.sh index 1bb68a2911c525..ef6e7b97051624 100755 --- a/scripts/build_coverage.sh +++ b/scripts/build_coverage.sh @@ -179,7 +179,7 @@ mkdir -p "$COVERAGE_ROOT" lcov --initial --capture --directory "$OUTPUT_ROOT/obj/src" --exclude="$PWD"/zzz_generated/* --exclude="$PWD"/third_party/* --exclude=/usr/include/* --output-file "$COVERAGE_ROOT/lcov_base.info" lcov --capture --directory "$OUTPUT_ROOT/obj/src" --exclude="$PWD"/zzz_generated/* --exclude="$PWD"/third_party/* --exclude=/usr/include/* --output-file "$COVERAGE_ROOT/lcov_test.info" lcov --add-tracefile "$COVERAGE_ROOT/lcov_base.info" --add-tracefile "$COVERAGE_ROOT/lcov_test.info" --output-file "$COVERAGE_ROOT/lcov_final.info" -genhtml "$COVERAGE_ROOT/lcov_final.info" --output-directory "$COVERAGE_ROOT/html" +genhtml "$COVERAGE_ROOT/lcov_final.info" --output-directory "$COVERAGE_ROOT/html" --title "SHA:$(git rev-parse HEAD)" --header-title "Matter SDK Coverage Report" # Copy webapp's YAML file to the coverage output directory cp "$CHIP_ROOT/integrations/appengine/webapp_config.yaml" "$COVERAGE_ROOT/webapp_config.yaml" From 9e203e211542f8e8b6a94611a7eed202ecdddc03 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Fri, 13 Dec 2024 12:42:49 +0530 Subject: [PATCH 43/72] da_revocation: option to load test data from the test without using file (#36759) * da_revocation: option to load test data from the test without using file * move the variable declaration inside scope * Move the variables whre they are used --- .../TestDACRevocationDelegateImpl.cpp | 59 ++++++++++++++----- .../TestDACRevocationDelegateImpl.h | 5 ++ .../TestDeviceAttestationCredentials.cpp | 49 ++++++++------- 3 files changed, 71 insertions(+), 42 deletions(-) diff --git a/src/credentials/attestation_verifier/TestDACRevocationDelegateImpl.cpp b/src/credentials/attestation_verifier/TestDACRevocationDelegateImpl.cpp index 15804a61a3ead2..7b3f0094c7249e 100644 --- a/src/credentials/attestation_verifier/TestDACRevocationDelegateImpl.cpp +++ b/src/credentials/attestation_verifier/TestDACRevocationDelegateImpl.cpp @@ -50,12 +50,23 @@ CHIP_ERROR TestDACRevocationDelegateImpl::SetDeviceAttestationRevocationSetPath( return CHIP_NO_ERROR; } +CHIP_ERROR TestDACRevocationDelegateImpl::SetDeviceAttestationRevocationData(const std::string & jsonData) +{ + mRevocationData = jsonData; + return CHIP_NO_ERROR; +} + void TestDACRevocationDelegateImpl::ClearDeviceAttestationRevocationSetPath() { // clear the string_view mDeviceAttestationRevocationSetPath = mDeviceAttestationRevocationSetPath.substr(0, 0); } +void TestDACRevocationDelegateImpl::ClearDeviceAttestationRevocationData() +{ + mRevocationData.clear(); +} + // Check if issuer and AKID matches with the crl signer OR crl signer delegator's subject and SKID bool TestDACRevocationDelegateImpl::CrossValidateCert(const Json::Value & revokedSet, const std::string & akidHexStr, const std::string & issuerNameBase64Str) @@ -115,26 +126,42 @@ bool TestDACRevocationDelegateImpl::CrossValidateCert(const Json::Value & revoke bool TestDACRevocationDelegateImpl::IsEntryInRevocationSet(const std::string & akidHexStr, const std::string & issuerNameBase64Str, const std::string & serialNumberHexStr) { - std::ifstream file(mDeviceAttestationRevocationSetPath.c_str()); - if (!file.is_open()) - { - ChipLogError(NotSpecified, "Failed to open file: %s", mDeviceAttestationRevocationSetPath.c_str()); - return false; - } - - // Parse the JSON data incrementally - Json::CharReaderBuilder readerBuilder; Json::Value jsonData; - std::string errs; - bool parsingSuccessful = Json::parseFromStream(readerBuilder, file, &jsonData, &errs); + // Try direct data first, then fall back to file + if (!mRevocationData.empty()) + { + std::string errs; + std::istringstream jsonStream(!mRevocationData.empty() ? mRevocationData : "[]"); + if (!Json::parseFromStream(Json::CharReaderBuilder(), jsonStream, &jsonData, &errs)) + { + ChipLogError(NotSpecified, "Failed to parse JSON data: %s", errs.c_str()); + return false; + } + } + else if (!mDeviceAttestationRevocationSetPath.empty()) + { + std::string errs; + std::ifstream file(mDeviceAttestationRevocationSetPath.c_str()); + if (!file.is_open()) + { + ChipLogError(NotSpecified, "Failed to open file: %s", mDeviceAttestationRevocationSetPath.c_str()); + return false; + } - // Close the file as it's no longer needed - file.close(); + bool parsingSuccessful = Json::parseFromStream(Json::CharReaderBuilder(), file, &jsonData, &errs); + file.close(); - if (!parsingSuccessful) + if (!parsingSuccessful) + { + ChipLogError(NotSpecified, "Failed to parse JSON from file: %s", errs.c_str()); + return false; + } + } + else { - ChipLogError(NotSpecified, "Failed to parse JSON: %s", errs.c_str()); + ChipLogDetail(NotSpecified, "No revocation data available"); + // No revocation data available return false; } @@ -278,7 +305,7 @@ void TestDACRevocationDelegateImpl::CheckForRevokedDACChain( { AttestationVerificationResult attestationError = AttestationVerificationResult::kSuccess; - if (mDeviceAttestationRevocationSetPath.empty()) + if (mDeviceAttestationRevocationSetPath.empty() && mRevocationData.empty()) { onCompletion->mCall(onCompletion->mContext, info, attestationError); return; diff --git a/src/credentials/attestation_verifier/TestDACRevocationDelegateImpl.h b/src/credentials/attestation_verifier/TestDACRevocationDelegateImpl.h index cea143603c341d..fc93ce4487e83a 100644 --- a/src/credentials/attestation_verifier/TestDACRevocationDelegateImpl.h +++ b/src/credentials/attestation_verifier/TestDACRevocationDelegateImpl.h @@ -52,6 +52,10 @@ class TestDACRevocationDelegateImpl : public DeviceAttestationRevocationDelegate // This can be used to skip the revocation check void ClearDeviceAttestationRevocationSetPath(); + // Set JSON data directly for unit test purposes. + CHIP_ERROR SetDeviceAttestationRevocationData(const std::string & jsonData); + void ClearDeviceAttestationRevocationData(); + private: enum class KeyIdType : uint8_t { @@ -83,6 +87,7 @@ class TestDACRevocationDelegateImpl : public DeviceAttestationRevocationDelegate bool IsCertificateRevoked(const ByteSpan & certDer); std::string mDeviceAttestationRevocationSetPath; + std::string mRevocationData; // Stores direct JSON data }; } // namespace Credentials diff --git a/src/credentials/tests/TestDeviceAttestationCredentials.cpp b/src/credentials/tests/TestDeviceAttestationCredentials.cpp index 8480fff4daaae4..f5bee29df50533 100644 --- a/src/credentials/tests/TestDeviceAttestationCredentials.cpp +++ b/src/credentials/tests/TestDeviceAttestationCredentials.cpp @@ -417,17 +417,6 @@ TEST_F(TestDeviceAttestationCredentials, TestAttestationTrustStore) } } -static void WriteTestRevokedData(const char * jsonData, const char * fileName) -{ - // TODO: Add option to load test data from the test without using file. #34588 - - // write data to /tmp/sample_revoked_set.json using fstream APIs - std::ofstream file; - file.open(fileName, std::ofstream::out | std::ofstream::trunc); - file << jsonData; - file.close(); -} - TEST_F(TestDeviceAttestationCredentials, TestDACRevocationDelegateImpl) { uint8_t attestationElementsTestVector[] = { 0 }; @@ -456,16 +445,14 @@ TEST_F(TestDeviceAttestationCredentials, TestDACRevocationDelegateImpl) TestDACRevocationDelegateImpl revocationDelegateImpl; - // Test without revocation set + // Test without revocation data revocationDelegateImpl.CheckForRevokedDACChain(info, &attestationInformationVerificationCallback); EXPECT_EQ(attestationResult, AttestationVerificationResult::kSuccess); - const char * tmpJsonFile = "/tmp/sample_revoked_set.json"; - revocationDelegateImpl.SetDeviceAttestationRevocationSetPath(tmpJsonFile); - // Test empty json - WriteTestRevokedData("", tmpJsonFile); + revocationDelegateImpl.SetDeviceAttestationRevocationData(""); revocationDelegateImpl.CheckForRevokedDACChain(info, &attestationInformationVerificationCallback); + revocationDelegateImpl.ClearDeviceAttestationRevocationData(); EXPECT_EQ(attestationResult, AttestationVerificationResult::kSuccess); // Test DAC is revoked, crl signer is PAI itself @@ -478,8 +465,9 @@ TEST_F(TestDeviceAttestationCredentials, TestDACRevocationDelegateImpl) "revoked_serial_numbers": ["0C694F7F866067B2"] }] )"; - WriteTestRevokedData(jsonData, tmpJsonFile); + revocationDelegateImpl.SetDeviceAttestationRevocationData(jsonData); revocationDelegateImpl.CheckForRevokedDACChain(info, &attestationInformationVerificationCallback); + revocationDelegateImpl.ClearDeviceAttestationRevocationData(); EXPECT_EQ(attestationResult, AttestationVerificationResult::kDacRevoked); // Test PAI is revoked, crl signer is PAA itself @@ -492,8 +480,9 @@ TEST_F(TestDeviceAttestationCredentials, TestDACRevocationDelegateImpl) "revoked_serial_numbers": ["3E6CE6509AD840CD"] }] )"; - WriteTestRevokedData(jsonData, tmpJsonFile); + revocationDelegateImpl.SetDeviceAttestationRevocationData(jsonData); revocationDelegateImpl.CheckForRevokedDACChain(info, &attestationInformationVerificationCallback); + revocationDelegateImpl.ClearDeviceAttestationRevocationData(); EXPECT_EQ(attestationResult, AttestationVerificationResult::kPaiRevoked); // Test DAC and PAI both revoked, crl signers are PAI and PAA respectively @@ -513,7 +502,7 @@ TEST_F(TestDeviceAttestationCredentials, TestDACRevocationDelegateImpl) "revoked_serial_numbers": ["3E6CE6509AD840CD"] }] )"; - WriteTestRevokedData(jsonData, tmpJsonFile); + revocationDelegateImpl.SetDeviceAttestationRevocationData(jsonData); revocationDelegateImpl.CheckForRevokedDACChain(info, &attestationInformationVerificationCallback); EXPECT_EQ(attestationResult, AttestationVerificationResult::kPaiAndDacRevoked); @@ -523,6 +512,7 @@ TEST_F(TestDeviceAttestationCredentials, TestDACRevocationDelegateImpl) TestCerts::sTestCert_PAI_FFF2_8001_Cert, TestCerts::sTestCert_DAC_FFF2_8001_0008_Cert, ByteSpan(attestationNonceTestVector), static_cast(0xFFF2), 0x8001); revocationDelegateImpl.CheckForRevokedDACChain(FFF2_8001_info, &attestationInformationVerificationCallback); + revocationDelegateImpl.ClearDeviceAttestationRevocationData(); EXPECT_EQ(attestationResult, AttestationVerificationResult::kSuccess); // Test issuer does not match @@ -536,8 +526,9 @@ TEST_F(TestDeviceAttestationCredentials, TestDACRevocationDelegateImpl) "revoked_serial_numbers": ["0C694F7F866067B2"] }] )"; - WriteTestRevokedData(jsonData, tmpJsonFile); + revocationDelegateImpl.SetDeviceAttestationRevocationData(jsonData); revocationDelegateImpl.CheckForRevokedDACChain(info, &attestationInformationVerificationCallback); + revocationDelegateImpl.ClearDeviceAttestationRevocationData(); EXPECT_EQ(attestationResult, AttestationVerificationResult::kSuccess); // Test subject key ID does not match @@ -551,8 +542,9 @@ TEST_F(TestDeviceAttestationCredentials, TestDACRevocationDelegateImpl) "revoked_serial_numbers": ["0C694F7F866067B2"] }] )"; - WriteTestRevokedData(jsonData, tmpJsonFile); + revocationDelegateImpl.SetDeviceAttestationRevocationData(jsonData); revocationDelegateImpl.CheckForRevokedDACChain(info, &attestationInformationVerificationCallback); + revocationDelegateImpl.ClearDeviceAttestationRevocationData(); EXPECT_EQ(attestationResult, AttestationVerificationResult::kSuccess); // Test serial number does not match @@ -566,8 +558,9 @@ TEST_F(TestDeviceAttestationCredentials, TestDACRevocationDelegateImpl) "revoked_serial_numbers": ["3E6CE6509AD840CD1", "BC694F7F866067B1"] }] )"; - WriteTestRevokedData(jsonData, tmpJsonFile); + revocationDelegateImpl.SetDeviceAttestationRevocationData(jsonData); revocationDelegateImpl.CheckForRevokedDACChain(info, &attestationInformationVerificationCallback); + revocationDelegateImpl.ClearDeviceAttestationRevocationData(); EXPECT_EQ(attestationResult, AttestationVerificationResult::kSuccess); // Test starting serial number bytes match but not all, @@ -581,8 +574,9 @@ TEST_F(TestDeviceAttestationCredentials, TestDACRevocationDelegateImpl) "revoked_serial_numbers": ["0C694F7F866067B21234"] }] )"; - WriteTestRevokedData(jsonData, tmpJsonFile); + revocationDelegateImpl.SetDeviceAttestationRevocationData(jsonData); revocationDelegateImpl.CheckForRevokedDACChain(info, &attestationInformationVerificationCallback); + revocationDelegateImpl.ClearDeviceAttestationRevocationData(); EXPECT_EQ(attestationResult, AttestationVerificationResult::kSuccess); // Test DAC is revoked, and crl signer delegator is present @@ -597,8 +591,9 @@ TEST_F(TestDeviceAttestationCredentials, TestDACRevocationDelegateImpl) "revoked_serial_numbers": ["0C694F7F866067B2"] }] )"; - WriteTestRevokedData(jsonData, tmpJsonFile); + revocationDelegateImpl.SetDeviceAttestationRevocationData(jsonData); revocationDelegateImpl.CheckForRevokedDACChain(info, &attestationInformationVerificationCallback); + revocationDelegateImpl.ClearDeviceAttestationRevocationData(); EXPECT_EQ(attestationResult, AttestationVerificationResult::kDacRevoked); // Test with invalid crl signer cert missing begin and end cert markers @@ -612,8 +607,9 @@ TEST_F(TestDeviceAttestationCredentials, TestDACRevocationDelegateImpl) }] )"; - WriteTestRevokedData(jsonData, tmpJsonFile); + revocationDelegateImpl.SetDeviceAttestationRevocationData(jsonData); revocationDelegateImpl.CheckForRevokedDACChain(info, &attestationInformationVerificationCallback); + revocationDelegateImpl.ClearDeviceAttestationRevocationData(); EXPECT_EQ(attestationResult, AttestationVerificationResult::kSuccess); // test with malformed crl signer certificate @@ -627,7 +623,8 @@ TEST_F(TestDeviceAttestationCredentials, TestDACRevocationDelegateImpl) }] )"; - WriteTestRevokedData(jsonData, tmpJsonFile); + revocationDelegateImpl.SetDeviceAttestationRevocationData(jsonData); revocationDelegateImpl.CheckForRevokedDACChain(info, &attestationInformationVerificationCallback); + revocationDelegateImpl.ClearDeviceAttestationRevocationData(); EXPECT_EQ(attestationResult, AttestationVerificationResult::kSuccess); } From c9a5d13ce5a2cfd71957db66b22a12c1f1626d20 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 13 Dec 2024 12:25:06 -0500 Subject: [PATCH 44/72] Create a `SpanSearchValue` class that allows tree-searching without extra intermediate `if null/missing` checks. (#36754) * Start adding the fluent tree object * Start adding unit tests * Add test file * more testing * update sizes hint and make use of things into CodegenDataModelProvider * Restyle * Fix some commments * More merge fixes * Remove some odd copy&paste comments * Update src/lib/support/FluentTreeObject.h Co-authored-by: Boris Zbarsky * Update src/lib/support/FluentTreeObject.h Co-authored-by: Boris Zbarsky * Fix up comments a bit * Simplify FluentTreeObject a bit * Extra wrapper not needed * Cleaned up comments * Restyled by clang-format * Sed rename FluentTreeObject to SpanSearchValue * Also rename files * Restyle * Very slight reduction in complexity that reduces extra flash usage by a few bytes * Another minor source code size decrease * Even slightly smaller code * Restyle * Fix comment typo * make cc32xx compile optimized for size by default, so we can treak flash usage as such * Restyled by gn * Update src/data-model-providers/codegen/CodegenDataModelProvider.cpp Co-authored-by: Boris Zbarsky * Update src/lib/support/SpanSearchValue.h Co-authored-by: Boris Zbarsky * Update src/lib/support/SpanSearchValue.h Co-authored-by: Boris Zbarsky * Update src/lib/support/SpanSearchValue.h Co-authored-by: Boris Zbarsky * Rename tree to searchable * Fix comment * Restyled by clang-format --------- Co-authored-by: Andrei Litvin Co-authored-by: Boris Zbarsky Co-authored-by: Restyled.io --- .../codegen/CodegenDataModelProvider.cpp | 87 +++----- src/lib/support/BUILD.gn | 1 + src/lib/support/SpanSearchValue.h | 154 +++++++++++++++ src/lib/support/tests/BUILD.gn | 1 + src/lib/support/tests/TestSpanSearchValue.cpp | 187 ++++++++++++++++++ src/platform/cc32xx/args.gni | 3 + 6 files changed, 373 insertions(+), 60 deletions(-) create mode 100644 src/lib/support/SpanSearchValue.h create mode 100644 src/lib/support/tests/TestSpanSearchValue.cpp diff --git a/src/data-model-providers/codegen/CodegenDataModelProvider.cpp b/src/data-model-providers/codegen/CodegenDataModelProvider.cpp index 95bac8fbbf82f3..b599ba1dfdc0dd 100644 --- a/src/data-model-providers/codegen/CodegenDataModelProvider.cpp +++ b/src/data-model-providers/codegen/CodegenDataModelProvider.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -106,6 +107,19 @@ using detail::EnumeratorCommandFinder; namespace { +/// Search by device type within a span of EmberAfDeviceType (finds the device type that matches the given +/// DataModel::DeviceTypeEntry) +struct ByDeviceType +{ + using Key = DataModel::DeviceTypeEntry; + using Type = const EmberAfDeviceType; + static Span GetSpan(Span & data) { return data; } + static bool HasKey(const Key & id, const Type & instance) + { + return (instance.deviceId == id.deviceTypeId) && (instance.deviceVersion == id.deviceTypeRevision); + } +}; + const CommandId * AcceptedCommands(const EmberAfCluster & cluster) { return cluster.acceptedCommandList; @@ -268,51 +282,17 @@ DataModel::CommandEntry CommandEntryFrom(const ConcreteClusterPath & clusterPath // to a common type is probably better. Need to figure out dependencies since // this would make ember return datamodel-provider types. // See: https://github.com/project-chip/connectedhomeip/issues/35889 -DataModel::DeviceTypeEntry DeviceTypeEntryFromEmber(const EmberAfDeviceType & other) +std::optional DeviceTypeEntryFromEmber(const EmberAfDeviceType * other) { - DataModel::DeviceTypeEntry entry; - - entry.deviceTypeId = other.deviceId; - entry.deviceTypeRevision = other.deviceVersion; - - return entry; -} - -// Explicitly compare for identical entries. note that types are different, -// so you must do `a == b` and the `b == a` will not work. -bool operator==(const DataModel::DeviceTypeEntry & a, const EmberAfDeviceType & b) -{ - return (a.deviceTypeId == b.deviceId) && (a.deviceTypeRevision == b.deviceVersion); -} - -/// Find the `index` where one of the following holds: -/// - types[index - 1] == previous OR -/// - 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 hintWherePreviousMayBe) -{ - if (hintWherePreviousMayBe < types.size()) - { - // this is a valid hint ... see if we are lucky - if (previous == types[hintWherePreviousMayBe]) - { - return hintWherePreviousMayBe + 1; // return the next index - } - } - - // hint was not useful. We have to do a full search - for (unsigned idx = 0; idx < types.size(); idx++) + if (other == nullptr) { - if (previous == types[idx]) - { - return idx + 1; - } + return std::nullopt; } - // cast should be safe as we know we do not have that many types - return static_cast(types.size()); + return DataModel::DeviceTypeEntry{ + .deviceTypeId = other->deviceId, + .deviceTypeRevision = other->deviceVersion, + }; } const ConcreteCommandPath kInvalidCommandPath(kInvalidEndpointId, kInvalidClusterId, kInvalidCommandId); @@ -894,15 +874,9 @@ std::optional CodegenDataModelProvider::FirstDeviceT CHIP_ERROR err = CHIP_NO_ERROR; Span deviceTypes = emberAfDeviceTypeListFromEndpointIndex(*endpoint_index, err); + SpanSearchValue> searchable(&deviceTypes); - if (deviceTypes.empty()) - { - return std::nullopt; - } - - // we start at the beginning - mDeviceTypeIterationHint = 0; - return DeviceTypeEntryFromEmber(deviceTypes[0]); + return DeviceTypeEntryFromEmber(searchable.First(mDeviceTypeIterationHint).Value()); } std::optional CodegenDataModelProvider::NextDeviceType(EndpointId endpoint, @@ -917,18 +891,11 @@ std::optional CodegenDataModelProvider::NextDeviceTy return std::nullopt; } - CHIP_ERROR err = CHIP_NO_ERROR; - Span deviceTypes = emberAfDeviceTypeListFromEndpointIndex(*endpoint_index, err); - - unsigned idx = FindNextDeviceTypeIndex(deviceTypes, previous, mDeviceTypeIterationHint); - - if (idx >= deviceTypes.size()) - { - return std::nullopt; - } + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Span deviceTypes = emberAfDeviceTypeListFromEndpointIndex(*endpoint_index, err); + SpanSearchValue> searchable(&deviceTypes); - mDeviceTypeIterationHint = idx; - return DeviceTypeEntryFromEmber(deviceTypes[idx]); + return DeviceTypeEntryFromEmber(searchable.Next(previous, mDeviceTypeIterationHint).Value()); } std::optional CodegenDataModelProvider::GetFirstSemanticTag(EndpointId endpoint) diff --git a/src/lib/support/BUILD.gn b/src/lib/support/BUILD.gn index a8daba8f5537e3..29a381d620f822 100644 --- a/src/lib/support/BUILD.gn +++ b/src/lib/support/BUILD.gn @@ -236,6 +236,7 @@ static_library("support") { "ScopedBuffer.h", "SetupDiscriminator.h", "SortUtils.h", + "SpanSearchValue.h", "StateMachine.h", "StringBuilder.cpp", "StringBuilder.h", diff --git a/src/lib/support/SpanSearchValue.h b/src/lib/support/SpanSearchValue.h new file mode 100644 index 00000000000000..e11a9e64c0050d --- /dev/null +++ b/src/lib/support/SpanSearchValue.h @@ -0,0 +1,154 @@ +/* + * 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 + +#include + +namespace chip { + +/// represents a wrapper around a type `T` that contains internal +/// `Span<...>` values of other sub-types. It allows searching within the container sub-spans +/// to create new containers. +/// +/// The use case is that we very often search within nested containers, like "find-endpoint" + "find-cluster" + "find-attribute" +/// and we generally only care about "does the last element exist or not" +/// +/// A typical example of the way this class is used looks like this: +/// +/// SpanSearchValue container(somePointer); +/// +/// const AcceptedCommandData * value = +/// container +/// .Find(path.mEndpointId, mEndpointIndexHint) +/// .Find(path.mClusterId, mServerClusterHint) +/// .Find(path.mCommandId, mAcceptedCommandHint) +/// .Value(); +/// +/// Where a `ByFoo` structure looks like: +/// +/// struct ByFoo { +/// using Key = int; // the KEY inside a type +/// using Type = SomeValueType; // The type that is indexed by `Key` +/// +/// /// Allows getting the "Span of Type" from an underlying structure. +/// /// A `SpanSearchValue` will require a `GetSpan(Foo&)` +/// static Span GetSpan(ContainerType & data) { /* return ... */ } +/// +/// /// Checks that the `Type` value has the given `Key` or not +/// static bool HasKey(const Key & id, const Type & instance) { /* return "instance has key id" */ } +/// } +/// +/// Where we define: +/// - how to get a "span of sub-elements" for an object (`GetSpan`) +/// - how to determine if a given sub-element has the "correct key" +template +class SpanSearchValue +{ +public: + SpanSearchValue() : mValue(nullptr) {} + SpanSearchValue(std::nullptr_t) : mValue(nullptr) {} + explicit SpanSearchValue(T * value) : mValue(value) {} + + /// Returns nullptr if such an element does not exist or non-null valid value if the element exists + T * Value() const { return mValue; } + + /// Gets the first element of `TYPE::Type` + template + SpanSearchValue First(unsigned & indexHint) + { + // if no value, searching more also yields no value + VerifyOrReturnValue(mValue != nullptr, nullptr); + + Span value_span = TYPE::GetSpan(*mValue); + VerifyOrReturnValue(!value_span.empty(), nullptr); + + // found it, save the hint + indexHint = 0; + return SpanSearchValue(&value_span[0]); + } + + /// Find the value corresponding to `key` + template + SpanSearchValue Find(typename TYPE::Key key, unsigned & indexHint) + { + VerifyOrReturnValue(mValue != nullptr, nullptr); + + Span value_span = TYPE::GetSpan(*mValue); + + if (!FindIndexUsingHint(key, value_span, indexHint, TYPE::HasKey)) + { + return nullptr; + } + + return SpanSearchValue(&value_span[indexHint]); + } + + /// Finds the value that occurs after `key` in the underlying collection. + template + SpanSearchValue Next(typename TYPE::Key key, unsigned & indexHint) + { + VerifyOrReturnValue(mValue != nullptr, nullptr); + + Span value_span = TYPE::GetSpan(*mValue); + + if (!FindIndexUsingHint(key, value_span, indexHint, TYPE::HasKey)) + { + return nullptr; + } + + VerifyOrReturnValue((indexHint + 1) < value_span.size(), nullptr); + + indexHint++; + return SpanSearchValue(&value_span[indexHint]); + } + +private: + T * mValue = nullptr; // underlying value, NULL if such a value does not exist + + /// Search for the index where `needle` is located inside `haystack` + /// + /// using `haystackValueMatchesNeedle` to find if a given haystack value matches the given needle + /// + /// `in_out_hint` contains a start search point at the start and will contain the found index + /// location (if found) at the end. + /// + /// Returns true on success (index found) false on failure (index not found). If returning + /// false, the value of `in_out_hint` is unchanged + template + static bool FindIndexUsingHint(const N & needle, Span haystack, unsigned & in_out_hint, + bool (*haystackValueMatchesNeedle)(const N &, const typename std::remove_const::type &)) + { + // search starts at `hint` rather than 0 + const unsigned haystackSize = static_cast(haystack.size()); + unsigned checkIndex = (in_out_hint < haystackSize) ? in_out_hint : 0; + + for (unsigned i = 0; i < haystackSize; i++, checkIndex++) + { + if (haystackValueMatchesNeedle(needle, haystack[checkIndex % haystackSize])) + { + in_out_hint = checkIndex % haystackSize; + return true; + } + } + + return false; + } +}; + +} // namespace chip diff --git a/src/lib/support/tests/BUILD.gn b/src/lib/support/tests/BUILD.gn index c6bfddb9269a7a..d814f70c477ed4 100644 --- a/src/lib/support/tests/BUILD.gn +++ b/src/lib/support/tests/BUILD.gn @@ -56,6 +56,7 @@ chip_test_suite("tests") { "TestScopedBuffer.cpp", "TestSorting.cpp", "TestSpan.cpp", + "TestSpanSearchValue.cpp", "TestStateMachine.cpp", "TestStaticSupportSmartPtr.cpp", "TestStringBuilder.cpp", diff --git a/src/lib/support/tests/TestSpanSearchValue.cpp b/src/lib/support/tests/TestSpanSearchValue.cpp new file mode 100644 index 00000000000000..469c590d0c1a38 --- /dev/null +++ b/src/lib/support/tests/TestSpanSearchValue.cpp @@ -0,0 +1,187 @@ +/* + * 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 "pw_unit_test/framework.h" +#include + +#include +#include +#include + +namespace { + +using namespace chip; + +struct ClusterData +{ + const ClusterId id; + const char * name; +}; + +struct EndpointData +{ + const EndpointId id; + + const char * name; + Span serverClusters; + Span clientClusters; +}; + +struct EndpointItemsWrapper +{ + Span data; + + template + EndpointItemsWrapper(EndpointData (&d)[N]) : data(d) + {} +}; + +const ClusterData gClusterList1[] = { + { + .id = 100, + .name = "one hundred", + }, + { + .id = 200, + .name = "two hundred", + }, +}; + +const ClusterData gClusterList2[] = { + { + .id = 1, + .name = "just one", + }, +}; + +EndpointData gEndpointDataItems[] = { + { + .id = 123, + .name = "foo", + .serverClusters = Span(gClusterList1), + .clientClusters = Span(gClusterList2), + }, + { + .id = 456, + .name = "bar", + .serverClusters = Span(gClusterList2), + .clientClusters = Span(), + }, + { + .id = 1000, + .name = "Empty", + .serverClusters = Span(), + .clientClusters = Span(), + }, +}; + +/// search index definitions +struct ByEndpoint +{ + using Key = EndpointId; + using Type = const EndpointData; + static Span GetSpan(EndpointItemsWrapper & data) { return data.data; } + static bool HasKey(const Key & id, const Type & instance) { return instance.id == id; } +}; + +struct ByServerCluster +{ + using Key = ClusterId; + using Type = const ClusterData; + static Span GetSpan(const EndpointData & data) { return data.serverClusters; } + static bool HasKey(const Key & id, const Type & instance) { return instance.id == id; } +}; + +struct ByClientCluster +{ + using Key = ClusterId; + using Type = const ClusterData; + static Span GetSpan(const EndpointData & data) { return data.clientClusters; } + static bool HasKey(const Key & id, const Type & instance) { return instance.id == id; } +}; + +} // namespace + +TEST(TestSpanSearchValue, TestFunctionality) +{ + EndpointItemsWrapper wrapper(gEndpointDataItems); + SpanSearchValue tree(&wrapper); + + EXPECT_EQ(tree.Value(), &wrapper); // value getting to start matches + + // search first items + { + unsigned hint1 = 0; + auto ep = tree.First(hint1); + + unsigned hint2 = 0; + auto cl = ep.First(hint2); + + ASSERT_NE(cl.Value(), nullptr); + EXPECT_EQ(cl.Value()->id, 100u); + EXPECT_STREQ(cl.Value()->name, "one hundred"); + } + + // one level search, with hint + { + unsigned hint = 0; + ASSERT_NE(tree.Find(123, hint).Value(), nullptr); + ASSERT_STREQ(tree.Find(123, hint).Value()->name, "foo"); + EXPECT_EQ(hint, 0u); + + ASSERT_NE(tree.Find(456, hint).Value(), nullptr); + EXPECT_EQ(hint, 1u); + EXPECT_STREQ(tree.Find(456, hint).Value()->name, "bar"); + EXPECT_EQ(hint, 1u); + + // hint is ignored here + EXPECT_STREQ(tree.Find(123, hint).Value()->name, "foo"); + EXPECT_EQ(hint, 0u); + + EXPECT_STREQ(tree.Find(1000, hint).Value()->name, "Empty"); + EXPECT_EQ(hint, 2u); + + // Invalid searches + EXPECT_EQ(tree.Find(12345, hint).Value(), nullptr); + EXPECT_EQ(tree.Find(0, hint).Value(), nullptr); + } + + // searches for "next" + { + unsigned hint = 0; + auto next = tree.Next(123, hint); + + ASSERT_NE(next.Value(), nullptr); + EXPECT_EQ(hint, 1u); + EXPECT_EQ(next.Value()->id, 456u); + EXPECT_STREQ(next.Value()->name, "bar"); + + next = tree.Next(456, hint); + ASSERT_NE(next.Value(), nullptr); + EXPECT_EQ(hint, 2u); + EXPECT_EQ(next.Value()->id, 1000u); + EXPECT_STREQ(next.Value()->name, "Empty"); + + /// search at the end + next = tree.Next(1000, hint); + EXPECT_EQ(next.Value(), nullptr); + + // null value preserves the failure + unsigned clusterHint = 0; + auto sub_item = next.Find(123, clusterHint); + EXPECT_EQ(sub_item.Value(), nullptr); + } +} diff --git a/src/platform/cc32xx/args.gni b/src/platform/cc32xx/args.gni index 288aa5a1edc188..d819c03536e330 100755 --- a/src/platform/cc32xx/args.gni +++ b/src/platform/cc32xx/args.gni @@ -34,3 +34,6 @@ chip_inet_config_enable_ipv4 = true chip_inet_config_enable_dns_resolver = false chip_build_tests = false + +# small binaries even in CI +optimize_debug_level = "s" From 2b8f5d7669a980b1b3ac93c37efaa31ed987c82f Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 13 Dec 2024 12:31:07 -0500 Subject: [PATCH 45/72] Add MTRErrorDomain mappings for a few more CHIP_ERROR values. (#36835) Also adds some basic round-tripping tests to catch mistakes. --- src/darwin/Framework/CHIP/MTRError.h | 79 +++++++++++-------- src/darwin/Framework/CHIP/MTRError.mm | 38 +++++++++ src/darwin/Framework/CHIP/MTRError_Internal.h | 5 +- src/darwin/Framework/CHIP/MTRError_Testable.h | 37 +++++++++ .../CHIPTests/MTRErrorMappingTests.m | 60 ++++++++++++++ .../Matter.xcodeproj/project.pbxproj | 8 ++ 6 files changed, 191 insertions(+), 36 deletions(-) create mode 100644 src/darwin/Framework/CHIP/MTRError_Testable.h create mode 100644 src/darwin/Framework/CHIPTests/MTRErrorMappingTests.m diff --git a/src/darwin/Framework/CHIP/MTRError.h b/src/darwin/Framework/CHIP/MTRError.h index 428464dab983ef..cf359fac960979 100644 --- a/src/darwin/Framework/CHIP/MTRError.h +++ b/src/darwin/Framework/CHIP/MTRError.h @@ -35,7 +35,6 @@ MTR_EXTERN NSErrorDomain const MTRInteractionErrorDomain MTR_AVAILABLE(ios(16.1) * Errors reported by the server side of a Matter interaction via the normal * Matter error-reporting mechanisms use MTRInteractionErrorDomain instead. */ -// clang-format off typedef NS_ERROR_ENUM(MTRErrorDomain, MTRErrorCode){ /** * MTRErrorCodeGeneralError represents a generic Matter error with no @@ -61,7 +60,7 @@ typedef NS_ERROR_ENUM(MTRErrorDomain, MTRErrorCode){ * MTRErrorCodeFabricExists is returned when trying to commission a device * into a fabric when it's already part of that fabric. */ - MTRErrorCodeFabricExists = 11, + MTRErrorCodeFabricExists = 11, /** * MTRErrorCodeUnknownSchema means the schema for the given cluster/attribute, @@ -95,9 +94,25 @@ typedef NS_ERROR_ENUM(MTRErrorDomain, MTRErrorCode){ /** * The operation was cancelled. */ - MTRErrorCodeCancelled MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6))= 16, + MTRErrorCodeCancelled MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 16, + + /** + * Access to some resource was denied. + */ + MTRErrorCodeAccessDenied MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 17, + + /** + * A request was made to some entity, and that entity cannot handle the + * request right now, but might be able to at a different point in time. + */ + MTRErrorCodeBusy MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 18, + + /** + * Something was requested that could not be located. + */ + MTRErrorCodeNotFound MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 19, }; -// clang-format on +#define MTRMaxErrorCode MTRErrorCodeNotFound /** * MTRInteractionErrorDomain contains errors that represent a Matter @@ -109,38 +124,36 @@ typedef NS_ERROR_ENUM(MTRErrorDomain, MTRErrorCode){ * was reported. This key will be absent if there was no cluster-specific * status. */ -// clang-format off typedef NS_ERROR_ENUM(MTRInteractionErrorDomain, MTRInteractionErrorCode){ // These values come from the general status code table in the Matter // Interaction Model specification. - MTRInteractionErrorCodeFailure = 0x01, - MTRInteractionErrorCodeInvalidSubscription = 0x7d, - MTRInteractionErrorCodeUnsupportedAccess = 0x7e, - MTRInteractionErrorCodeUnsupportedEndpoint = 0x7f, - MTRInteractionErrorCodeInvalidAction = 0x80, - MTRInteractionErrorCodeUnsupportedCommand = 0x81, - MTRInteractionErrorCodeInvalidCommand = 0x85, - MTRInteractionErrorCodeUnsupportedAttribute = 0x86, - MTRInteractionErrorCodeConstraintError = 0x87, - MTRInteractionErrorCodeUnsupportedWrite = 0x88, - MTRInteractionErrorCodeResourceExhausted = 0x89, - MTRInteractionErrorCodeNotFound = 0x8b, - MTRInteractionErrorCodeUnreportableAttribute = 0x8c, - MTRInteractionErrorCodeInvalidDataType = 0x8d, - MTRInteractionErrorCodeUnsupportedRead = 0x8f, - MTRInteractionErrorCodeDataVersionMismatch = 0x92, - MTRInteractionErrorCodeTimeout = 0x94, - MTRInteractionErrorCodeBusy = 0x9c, - MTRInteractionErrorCodeUnsupportedCluster = 0xc3, - MTRInteractionErrorCodeNoUpstreamSubscription = 0xc5, - MTRInteractionErrorCodeNeedsTimedInteraction = 0xc6, - MTRInteractionErrorCodeUnsupportedEvent = 0xc7, - MTRInteractionErrorCodePathsExhausted = 0xc8, - MTRInteractionErrorCodeTimedRequestMismatch = 0xc9, - MTRInteractionErrorCodeFailsafeRequired = 0xca, - MTRInteractionErrorCodeInvalidInState MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6))= 0xcb, - MTRInteractionErrorCodeNoCommandResponse MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6))= 0xcc, + MTRInteractionErrorCodeFailure = 0x01, + MTRInteractionErrorCodeInvalidSubscription = 0x7d, + MTRInteractionErrorCodeUnsupportedAccess = 0x7e, + MTRInteractionErrorCodeUnsupportedEndpoint = 0x7f, + MTRInteractionErrorCodeInvalidAction = 0x80, + MTRInteractionErrorCodeUnsupportedCommand = 0x81, + MTRInteractionErrorCodeInvalidCommand = 0x85, + MTRInteractionErrorCodeUnsupportedAttribute = 0x86, + MTRInteractionErrorCodeConstraintError = 0x87, + MTRInteractionErrorCodeUnsupportedWrite = 0x88, + MTRInteractionErrorCodeResourceExhausted = 0x89, + MTRInteractionErrorCodeNotFound = 0x8b, + MTRInteractionErrorCodeUnreportableAttribute = 0x8c, + MTRInteractionErrorCodeInvalidDataType = 0x8d, + MTRInteractionErrorCodeUnsupportedRead = 0x8f, + MTRInteractionErrorCodeDataVersionMismatch = 0x92, + MTRInteractionErrorCodeTimeout = 0x94, + MTRInteractionErrorCodeBusy = 0x9c, + MTRInteractionErrorCodeUnsupportedCluster = 0xc3, + MTRInteractionErrorCodeNoUpstreamSubscription = 0xc5, + MTRInteractionErrorCodeNeedsTimedInteraction = 0xc6, + MTRInteractionErrorCodeUnsupportedEvent = 0xc7, + MTRInteractionErrorCodePathsExhausted = 0xc8, + MTRInteractionErrorCodeTimedRequestMismatch = 0xc9, + MTRInteractionErrorCodeFailsafeRequired = 0xca, + MTRInteractionErrorCodeInvalidInState MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0xcb, + MTRInteractionErrorCodeNoCommandResponse MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0xcc, }; -// clang-format on NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRError.mm b/src/darwin/Framework/CHIP/MTRError.mm index e268ab49e32cc9..e7f3acb90ad5ba 100644 --- a/src/darwin/Framework/CHIP/MTRError.mm +++ b/src/darwin/Framework/CHIP/MTRError.mm @@ -107,6 +107,10 @@ + (NSError *)errorForCHIPErrorCode:(CHIP_ERROR)errorCode logContext:(id)contextT code = MTRErrorCodeFabricExists; description = NSLocalizedString(@"The device is already a member of this fabric.", nil); break; + case CHIP_ERROR_SCHEMA_MISMATCH.AsInteger(): + code = MTRErrorCodeSchemaMismatch; + description = NSLocalizedString(@"Data does not match expected schema.", nil); + break; case CHIP_ERROR_DECODE_FAILED.AsInteger(): code = MTRErrorCodeTLVDecodeFailed; description = NSLocalizedString(@"TLV decoding failed.", nil); @@ -122,6 +126,18 @@ + (NSError *)errorForCHIPErrorCode:(CHIP_ERROR)errorCode logContext:(id)contextT code = MTRErrorCodeCancelled; description = NSLocalizedString(@"The operation was cancelled.", nil); break; + case CHIP_ERROR_ACCESS_DENIED.AsInteger(): + code = MTRErrorCodeAccessDenied; + description = NSLocalizedString(@"Access denied.", nil); + break; + case CHIP_ERROR_BUSY.AsInteger(): + code = MTRErrorCodeBusy; + description = NSLocalizedString(@"Operation cannot be completed at this time: resource busy.", nil); + break; + case CHIP_ERROR_NOT_FOUND.AsInteger(): + code = MTRErrorCodeNotFound; + description = NSLocalizedString(@"Requested resource was not found.", nil); + break; default: code = MTRErrorCodeGeneralError; description = [NSString stringWithFormat:NSLocalizedString(@"General error: %u", nil), errorCode.AsInteger()]; @@ -141,6 +157,11 @@ + (NSError *)errorForCHIPErrorCode:(CHIP_ERROR)errorCode logContext:(id)contextT return error; } ++ (NSError *)errorForCHIPIntegerCode:(uint32_t)errorCode +{ + return [MTRError errorForCHIPErrorCode:chip::ChipError(errorCode)]; +} + + (NSError *)errorForIMStatus:(const chip::app::StatusIB &)status { if (status.IsSuccess()) { @@ -303,6 +324,9 @@ + (CHIP_ERROR)errorToCHIPErrorCode:(NSError * _Nullable)error case MTRErrorCodeFabricExists: code = CHIP_ERROR_FABRIC_EXISTS.AsInteger(); break; + case MTRErrorCodeSchemaMismatch: + code = CHIP_ERROR_SCHEMA_MISMATCH.AsInteger(); + break; case MTRErrorCodeTLVDecodeFailed: code = CHIP_ERROR_DECODE_FAILED.AsInteger(); break; @@ -312,6 +336,15 @@ + (CHIP_ERROR)errorToCHIPErrorCode:(NSError * _Nullable)error case MTRErrorCodeCancelled: code = CHIP_ERROR_CANCELLED.AsInteger(); break; + case MTRErrorCodeAccessDenied: + code = CHIP_ERROR_ACCESS_DENIED.AsInteger(); + break; + case MTRErrorCodeBusy: + code = CHIP_ERROR_BUSY.AsInteger(); + break; + case MTRErrorCodeNotFound: + code = CHIP_ERROR_NOT_FOUND.AsInteger(); + break; case MTRErrorCodeGeneralError: { id userInfoErrorCode = error.userInfo[@"errorCode"]; if ([userInfoErrorCode isKindOfClass:NSNumber.class]) { @@ -328,6 +361,11 @@ + (CHIP_ERROR)errorToCHIPErrorCode:(NSError * _Nullable)error return chip::ChipError(code); } ++ (uint32_t)errorToCHIPIntegerCode:(NSError * _Nullable)error +{ + return [self errorToCHIPErrorCode:error].AsInteger(); +} + @end @implementation MTRErrorHolder diff --git a/src/darwin/Framework/CHIP/MTRError_Internal.h b/src/darwin/Framework/CHIP/MTRError_Internal.h index c79cc17d95f198..5bb61116430958 100644 --- a/src/darwin/Framework/CHIP/MTRError_Internal.h +++ b/src/darwin/Framework/CHIP/MTRError_Internal.h @@ -16,9 +16,9 @@ */ #import -#import #import "MTRDefines_Internal.h" +#import "MTRError_Testable.h" #include #include @@ -27,8 +27,7 @@ NS_ASSUME_NONNULL_BEGIN MTR_DIRECT_MEMBERS -@interface MTRError : NSObject -+ (NSError *)errorWithCode:(MTRErrorCode)code; +@interface MTRError () + (NSError * _Nullable)errorForCHIPErrorCode:(CHIP_ERROR)errorCode; + (NSError * _Nullable)errorForCHIPErrorCode:(CHIP_ERROR)errorCode logContext:(id _Nullable)contextToLog; + (NSError * _Nullable)errorForIMStatus:(const chip::app::StatusIB &)status; diff --git a/src/darwin/Framework/CHIP/MTRError_Testable.h b/src/darwin/Framework/CHIP/MTRError_Testable.h new file mode 100644 index 00000000000000..a4456c6097ee01 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRError_Testable.h @@ -0,0 +1,37 @@ +/** + * 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 + +#import "MTRDefines_Internal.h" + +NS_ASSUME_NONNULL_BEGIN + +MTR_TESTABLE +@interface MTRError : NSObject + ++ (NSError *)errorWithCode:(MTRErrorCode)code; + +// For tests only, since we can't use CHIP_ERROR from there. The "code"s used +// here are integer representations of CHIP_ERROR. Otherwise these functions +// are just like errorForCHIPErrorCode and errorToCHIPErrorCode. ++ (NSError *)errorForCHIPIntegerCode:(uint32_t)code; ++ (uint32_t)errorToCHIPIntegerCode:(NSError * _Nullable)error; + +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIPTests/MTRErrorMappingTests.m b/src/darwin/Framework/CHIPTests/MTRErrorMappingTests.m new file mode 100644 index 00000000000000..3bcc6ba8046fd7 --- /dev/null +++ b/src/darwin/Framework/CHIPTests/MTRErrorMappingTests.m @@ -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 +#import + +// NOTE: This is a .mm file, so that it can include MTRError_Internal.h + +#import "MTRError_Testable.h" + +@interface MTRErrorMappingTests : XCTestCase +@end + +@implementation MTRErrorMappingTests + +- (void)testPublicNonInteractionAPIValues +{ + for (int errorCode = 1; errorCode <= MTRMaxErrorCode; errorCode++) { + // A few error codes are not actually representing CHIP_ERROR values. + if (errorCode == MTRErrorCodeWrongAddressType || errorCode == MTRErrorCodeUnknownSchema) { + continue; + } + + // All of these should round-trip appropriately. + __auto_type * error = [NSError errorWithDomain:MTRErrorDomain code:errorCode userInfo:nil]; + __auto_type * newError1 = [MTRError errorWithCode:(MTRErrorCode) errorCode]; + XCTAssertEqual(newError1.domain, error.domain, "Testing error code %d", errorCode); + XCTAssertEqual(newError1.code, error.code, "Testing error code %d", errorCode); + + __auto_type chipError = [MTRError errorToCHIPIntegerCode:error]; + __auto_type * newError2 = [MTRError errorForCHIPIntegerCode:chipError]; + XCTAssertEqual(newError2.domain, error.domain, "Testing error code %d", errorCode); + XCTAssertEqual(newError2.code, error.code, "Testing error code %d", errorCode); + } + + // Check that an unknown value becomes GeneralError. + __auto_type * error = [MTRError errorWithCode:(MTRErrorCode) (MTRMaxErrorCode + 1)]; + XCTAssertEqual(error.domain, MTRErrorDomain); + XCTAssertEqual(error.code, MTRMaxErrorCode + 1); + + __auto_type chipError = [MTRError errorToCHIPIntegerCode:error]; + __auto_type * newError = [MTRError errorForCHIPIntegerCode:chipError]; + XCTAssertEqual(newError.domain, MTRErrorDomain); + XCTAssertEqual(newError.code, MTRErrorCodeGeneralError); +} + +@end diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 1de3c69f2f1417..f2b89f0ca48a3f 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -178,6 +178,8 @@ 51565CB22A7AD77600469F18 /* MTRDeviceControllerDataStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51565CB02A7AD77600469F18 /* MTRDeviceControllerDataStore.mm */; }; 51565CB42A7AD78D00469F18 /* MTRDeviceControllerStorageDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 51565CB32A7AD78D00469F18 /* MTRDeviceControllerStorageDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 51565CB62A7B0D6600469F18 /* MTRDeviceControllerParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 51565CB52A7B0D6600469F18 /* MTRDeviceControllerParameters.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 51578AE92D0B9B1D001716FF /* MTRErrorMappingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 51578AE82D0B9B1D001716FF /* MTRErrorMappingTests.m */; }; + 51578AEB2D0B9DC0001716FF /* MTRError_Testable.h in Headers */ = {isa = PBXBuildFile; fileRef = 51578AEA2D0B9DC0001716FF /* MTRError_Testable.h */; }; 515BE4ED2B72C0C5000BC1FD /* MTRUnfairLock.h in Headers */ = {isa = PBXBuildFile; fileRef = 515BE4EC2B72C0C5000BC1FD /* MTRUnfairLock.h */; }; 515C1C6F284F9FFB00A48F0C /* MTRFramework.mm in Sources */ = {isa = PBXBuildFile; fileRef = 515C1C6D284F9FFB00A48F0C /* MTRFramework.mm */; }; 515C1C70284F9FFB00A48F0C /* MTRFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 515C1C6E284F9FFB00A48F0C /* MTRFramework.h */; }; @@ -669,6 +671,8 @@ 51565CB02A7AD77600469F18 /* MTRDeviceControllerDataStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceControllerDataStore.mm; sourceTree = ""; }; 51565CB32A7AD78D00469F18 /* MTRDeviceControllerStorageDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerStorageDelegate.h; sourceTree = ""; }; 51565CB52A7B0D6600469F18 /* MTRDeviceControllerParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerParameters.h; sourceTree = ""; }; + 51578AE82D0B9B1D001716FF /* MTRErrorMappingTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MTRErrorMappingTests.m; sourceTree = ""; }; + 51578AEA2D0B9DC0001716FF /* MTRError_Testable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRError_Testable.h; sourceTree = ""; }; 515BE4EC2B72C0C5000BC1FD /* MTRUnfairLock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRUnfairLock.h; sourceTree = ""; }; 515C1C6D284F9FFB00A48F0C /* MTRFramework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRFramework.mm; sourceTree = ""; }; 515C1C6E284F9FFB00A48F0C /* MTRFramework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRFramework.h; sourceTree = ""; }; @@ -1540,6 +1544,7 @@ 5109E9B32CB8B5DF0006884B /* MTRDeviceType.mm */, 5129BCFC26A9EE3300122DDF /* MTRError.h */, B2E0D7AB245B0B5C003C5B48 /* MTRError_Internal.h */, + 51578AEA2D0B9DC0001716FF /* MTRError_Testable.h */, B2E0D7AA245B0B5C003C5B48 /* MTRError.mm */, 754F3DF327FBB94B00E60580 /* MTREventTLVValueDecoder_Internal.h */, 515C1C6E284F9FFB00A48F0C /* MTRFramework.h */, @@ -1618,6 +1623,7 @@ 5109E9B62CB8B83D0006884B /* MTRDeviceTypeTests.m */, 51D9CB0A2BA37DCE0049D6DB /* MTRDSTOffsetTests.m */, 3D0C484A29DA4FA0006D811F /* MTRErrorTests.m */, + 51578AE82D0B9B1D001716FF /* MTRErrorMappingTests.m */, 5173A47829C0E82300F67F48 /* MTRFabricInfoTests.m */, 8874C1312B69C7060084BEFD /* MTRMetricsTests.m */, 510CECA6297F72470064E0B3 /* MTROperationalCertificateIssuerTests.m */, @@ -1941,6 +1947,7 @@ 9B5CCB5D2C6EC890009DD99B /* MTRDevice_XPC.h in Headers */, 991DC08B247704DC00C13860 /* MTRLogging_Internal.h in Headers */, 51FE723F2ACDEF3E00437032 /* MTRCommandPayloadExtensions_Internal.h in Headers */, + 51578AEB2D0B9DC0001716FF /* MTRError_Testable.h in Headers */, 51D0B12E2B6177FD006E3511 /* MTRAccessGrant.h in Headers */, 5109E9B52CB8B5DF0006884B /* MTRDeviceType.h in Headers */, 1E4D655029C208DD00BC3478 /* MTRCommissionableBrowserDelegate.h in Headers */, @@ -2348,6 +2355,7 @@ 518D3F852AA14006008E0007 /* MTRControllerAdvertisingTests.m in Sources */, 51C8E3F82825CDB600D47D00 /* MTRTestKeys.m in Sources */, 51C984622A61CE2A00B0AD9A /* MTRFabricInfoChecker.m in Sources */, + 51578AE92D0B9B1D001716FF /* MTRErrorMappingTests.m in Sources */, 99C65E10267282F1003402F6 /* MTRControllerTests.m in Sources */, 8874C1322B69C7060084BEFD /* MTRMetricsTests.m in Sources */, 1E5801C328941C050033A199 /* MTRTestOTAProvider.m in Sources */, From d961628caae8aec4708a3347f4912f6000cdc623 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Fri, 13 Dec 2024 19:43:23 +0100 Subject: [PATCH 46/72] [Fabric-Sync] Fix ICD check-in handler registration (#36834) The fabric-sync app enables commissioner commissionee code. When doing so, we have two exchange managers registered due to a common platform code. In such case the default exchange is the server one, not the controller one. --- examples/fabric-sync/admin/FabricAdmin.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/fabric-sync/admin/FabricAdmin.cpp b/examples/fabric-sync/admin/FabricAdmin.cpp index 1716692691451a..3c6edadff5268e 100644 --- a/examples/fabric-sync/admin/FabricAdmin.cpp +++ b/examples/fabric-sync/admin/FabricAdmin.cpp @@ -16,8 +16,10 @@ */ #include "FabricAdmin.h" + #include #include +#include #include #include @@ -45,9 +47,8 @@ CHIP_ERROR FabricAdmin::Init() VerifyOrReturnError(engine != nullptr, CHIP_ERROR_INCORRECT_STATE); ReturnLogErrorOnFailure(IcdManager::Instance().Init(&sICDClientStorage, engine)); - auto exchangeMgr = Controller::DeviceControllerFactory::GetInstance().GetSystemState()->ExchangeMgr(); - VerifyOrReturnError(exchangeMgr != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnLogErrorOnFailure(sCheckInHandler.Init(exchangeMgr, &sICDClientStorage, &IcdManager::Instance(), engine)); + ReturnLogErrorOnFailure(sCheckInHandler.Init(&chip::Server::GetInstance().GetExchangeManager(), &sICDClientStorage, + &IcdManager::Instance(), engine)); ReturnLogErrorOnFailure(PairingManager::Instance().Init(GetDeviceCommissioner())); From 79c73bfa042968bcb47cd5c7d6c86f0615b390c8 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 13 Dec 2024 13:58:32 -0500 Subject: [PATCH 47/72] Improve Darwin discovery test. (#36833) 1) Don't fulfill the expectation we are waiting on until after we have logged our "Found device" bit. 2) Have "Found device" and "Removed device" bits actually log the data that we are adding/removing to our result list, so that if they don't match it's easier to tell what's going on. --- .../CHIPTests/MTRCommissionableBrowserTests.m | 44 ++++++++----------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m b/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m index 0acfbd9a580371..d2b5f797e4514b 100644 --- a/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m +++ b/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m @@ -104,6 +104,22 @@ - (void)controller:(MTRDeviceController *)controller didFindCommissionableDevice [_results addObject:snapshot]; + XCTAssertLessThanOrEqual(_results.count, kExpectedDiscoveredDevicesCount); + + __auto_type instanceName = device.instanceName; + __auto_type vendorId = device.vendorID; + __auto_type productId = device.productID; + __auto_type discriminator = device.discriminator; + __auto_type commissioningMode = device.commissioningMode; + + XCTAssertEqual(instanceName.length, 16); // The instance name is random, so just ensure the len is right. + XCTAssertEqualObjects(vendorId, @(kTestVendorId)); + XCTAssertTrue([kTestProductIds containsObject:productId]); + XCTAssertTrue([kTestDiscriminators containsObject:discriminator]); + XCTAssertEqual(commissioningMode, YES); + + NSLog(@"Found device %@", snapshot); + if (_results.count == kExpectedDiscoveredDevicesCount) { // Do some sanity checking on our results and removedResults to make // sure we really only saw the relevant set of things. @@ -123,39 +139,17 @@ - (void)controller:(MTRDeviceController *)controller didFindCommissionableDevice [self.expectation fulfill]; } } - - XCTAssertLessThanOrEqual(_results.count, kExpectedDiscoveredDevicesCount); - - __auto_type instanceName = device.instanceName; - __auto_type vendorId = device.vendorID; - __auto_type productId = device.productID; - __auto_type discriminator = device.discriminator; - __auto_type commissioningMode = device.commissioningMode; - - XCTAssertEqual(instanceName.length, 16); // The instance name is random, so just ensure the len is right. - XCTAssertEqualObjects(vendorId, @(kTestVendorId)); - XCTAssertTrue([kTestProductIds containsObject:productId]); - XCTAssertTrue([kTestDiscriminators containsObject:discriminator]); - XCTAssertEqual(commissioningMode, YES); - - NSLog(@"Found Device (%@) with discriminator: %@ (vendor: %@, product: %@)", instanceName, discriminator, vendorId, productId); } - (void)controller:(MTRDeviceController *)controller didRemoveCommissionableDevice:(MTRCommissionableBrowserResult *)device { - __auto_type instanceName = device.instanceName; - __auto_type vendorId = device.vendorID; - __auto_type productId = device.productID; - __auto_type discriminator = device.discriminator; - - NSLog( - @"Removed Device (%@) with discriminator: %@ (vendor: %@, product: %@)", instanceName, discriminator, vendorId, productId); - __auto_type * snapshot = ResultSnapshot(device); - XCTAssertTrue([_results containsObject:snapshot], @"Removed device %@ is not something we found before", snapshot); + XCTAssertTrue([_results containsObject:snapshot], @"Removed device %@ is not something we found before: %@", snapshot, _results); [_removedResults addObject:snapshot]; [_results removeObject:snapshot]; + + NSLog(@"Removed device %@", snapshot); } @end From d6bb79cf605019364b913bdee9d273f859139dd6 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Fri, 13 Dec 2024 13:59:11 -0500 Subject: [PATCH 48/72] Fix CI for DM XMLs (#34907) * Fix CI for data model changes * test change * Apply suggestions from code review * Update .github/workflows/check-data-model-directory-updates.yaml * update the workflow * Restyled by isort * linter * Not sure why this isn't running, remove condition * a bit more * Exit with correct code * simplify the checkout a bit * also allow scraper version changes * Revert "test change" This reverts commit 67eea597c6c31e9de77db868f38b058e48f91189. --------- Co-authored-by: Restyled.io --- .../check-data-model-directory-updates.yaml | 28 ++++++---- scripts/dm_xml_ci_change_enforcement.py | 52 +++++++++++++++++++ 2 files changed, 70 insertions(+), 10 deletions(-) create mode 100644 scripts/dm_xml_ci_change_enforcement.py diff --git a/.github/workflows/check-data-model-directory-updates.yaml b/.github/workflows/check-data-model-directory-updates.yaml index 305da81d9da817..7bd20c87e0e4ec 100644 --- a/.github/workflows/check-data-model-directory-updates.yaml +++ b/.github/workflows/check-data-model-directory-updates.yaml @@ -12,20 +12,28 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: Check for changes to data_model directory without a sha update +name: Data model directory checks on: pull_request: - paths: - - "data_model/**" jobs: - check-submodule-update-label: - name: Check for changes to data_model directory without a sha update + check-data_model-updates: + name: Check for updates to data model directory without SHA updates runs-on: ubuntu-latest - if: "git diff --name-only HEAD^..HEAD data_model/ | grep -q spec_sha" + container: + image: ghcr.io/project-chip/chip-build steps: - - name: Error Message - run: echo This pull request attempts to update data_model directory, but is missing updates to spec_sha file with the latest version of the sha. Files in the data_model directory are generated automatically and should not be updated manually. - - name: Fail Job - run: exit 1 + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 2 + - name: Check for changes to master data_model directory without a SHA update + run: | + python3 scripts/dm_xml_ci_change_enforcement.py data_model/master + - name: Check for changes to 1.3 data_model directory without a SHA update + run: | + python3 scripts/dm_xml_ci_change_enforcement.py data_model/1.3 + - name: Check for changes to 1.4 data_model directory without a SHA update + run: | + python3 scripts/dm_xml_ci_change_enforcement.py data_model/1.4 \ No newline at end of file diff --git a/scripts/dm_xml_ci_change_enforcement.py b/scripts/dm_xml_ci_change_enforcement.py new file mode 100644 index 00000000000000..0efe40f66faa49 --- /dev/null +++ b/scripts/dm_xml_ci_change_enforcement.py @@ -0,0 +1,52 @@ +#!/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 +import subprocess +import sys + +import click + + +@click.command() +@click.argument('dir', nargs=1, type=click.Path(exists=True)) +def check_dm_directory(dir): + clusters = os.path.join(dir, 'clusters') + device_types = os.path.join(dir, 'device_types') + if not os.path.isdir(clusters) or not os.path.isdir(device_types): + print(f"Invalid data model directory {dir}") + sys.exit(1) + + # 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) + + def check_dir(dir): + cmd = f'git diff HEAD^..HEAD --name-only -- {dir}' + output = subprocess.check_output(cmd, shell=True).decode().splitlines() + if output and 'spec_sha' not in output and 'scraper_version' not in output: + print(f'Data model directory {dir} had changes to the following files without a corresponding update to the spec SHA') + print(output) + print("Note that the data_model directory files are automatically updated by a spec scraper and should not be manually updated.") + return 1 + return 0 + + ret = check_dir(clusters) + check_dir(device_types) + sys.exit(ret) + + +if __name__ == '__main__': + check_dm_directory() From a43ce0ebfc47c135918f37d9f9a59d747e6c2371 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Fri, 13 Dec 2024 14:21:20 -0500 Subject: [PATCH 49/72] TC-VALCC-3.1: Allow immediate open of valve (#35851) * TC-VALCC-3.1: Allow immediate open of valve If the valve can be opened before the command is complete or before the next read is done, the test will fail because it expects the transitioning phase to happen. In the spec: When the movement is complete, the device SHALL set the CurrentState attribute to the Open value. ^ this can happen before the end of the command. * fixup for 3.1 test * another fixup for 3.1 * Add close at start of test * linter * Restyled by clang-format * Restyled by isort * Add back the feature check * TC-VALCC-3.3: Allow immediate open * Linter * Fix 3.2 * couple little fixes * Restyled by isort * linter --------- Co-authored-by: Restyled.io --- .../linux/ValveControlDelegate.cpp | 3 - ...valve-configuration-and-control-server.cpp | 22 ++- src/python_testing/TC_VALCC_3_1.py | 97 ++++++------ src/python_testing/TC_VALCC_3_2.py | 145 ++++++++--------- src/python_testing/TC_VALCC_3_3.py | 148 +++++++++--------- 5 files changed, 214 insertions(+), 201 deletions(-) diff --git a/examples/all-clusters-app/linux/ValveControlDelegate.cpp b/examples/all-clusters-app/linux/ValveControlDelegate.cpp index f161ee65eae504..ed006eaa14baec 100644 --- a/examples/all-clusters-app/linux/ValveControlDelegate.cpp +++ b/examples/all-clusters-app/linux/ValveControlDelegate.cpp @@ -38,7 +38,6 @@ DataModel::Nullable ValveControlDelegate::HandleOpenValve(DataMod // In this demo application, the transition is considered instant, // so current level is set to the requested level and current state is set to kOpen. currentLevel = sLevel; - Attributes::CurrentState::Set(kValveEndpoint, ValveConfigurationAndControl::ValveStateEnum::kOpen); return DataModel::Nullable(currentLevel); } @@ -48,8 +47,6 @@ CHIP_ERROR ValveControlDelegate::HandleCloseValve() sLastOpenDuration = 0; sLevel = 0; ReturnErrorOnFailure(ValveConfigurationAndControl::UpdateCurrentLevel(kValveEndpoint, sLevel)); - ReturnErrorOnFailure( - ValveConfigurationAndControl::UpdateCurrentState(kValveEndpoint, ValveConfigurationAndControl::ValveStateEnum::kClosed)); ChipLogProgress(NotSpecified, "Valve closed"); return CHIP_NO_ERROR; } diff --git a/src/app/clusters/valve-configuration-and-control-server/valve-configuration-and-control-server.cpp b/src/app/clusters/valve-configuration-and-control-server/valve-configuration-and-control-server.cpp index f6fa4e8fee6332..fd89ab135d384c 100644 --- a/src/app/clusters/valve-configuration-and-control-server/valve-configuration-and-control-server.cpp +++ b/src/app/clusters/valve-configuration-and-control-server/valve-configuration-and-control-server.cpp @@ -360,9 +360,9 @@ CHIP_ERROR SetValveLevel(EndpointId ep, DataModel::Nullable level, Data if (!isDelegateNull(delegate)) { DataModel::Nullable cLevel = delegate->HandleOpenValve(level); - if (HasFeature(ep, ValveConfigurationAndControl::Feature::kLevel)) + if (HasFeature(ep, ValveConfigurationAndControl::Feature::kLevel) && !cLevel.IsNull()) { - VerifyOrReturnError(Status::Success == CurrentLevel::Set(ep, cLevel), attribute_error); + UpdateCurrentLevel(ep, cLevel.Value()); } } // start countdown @@ -376,14 +376,28 @@ CHIP_ERROR UpdateCurrentLevel(EndpointId ep, Percent currentLevel) if (HasFeature(ep, ValveConfigurationAndControl::Feature::kLevel)) { VerifyOrReturnError(Status::Success == CurrentLevel::Set(ep, currentLevel), CHIP_IM_GLOBAL_STATUS(ConstraintError)); - return CHIP_NO_ERROR; } - return CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute); + DataModel::Nullable targetLevel = DataModel::NullNullable; + TargetLevel::Get(ep, targetLevel); + if (!targetLevel.IsNull() && currentLevel == targetLevel.Value()) + { + targetLevel = DataModel::NullNullable; + TargetLevel::Set(ep, targetLevel); + UpdateCurrentState(ep, currentLevel == 0 ? ValveStateEnum::kClosed : ValveStateEnum::kOpen); + } + return CHIP_NO_ERROR; } CHIP_ERROR UpdateCurrentState(EndpointId ep, ValveConfigurationAndControl::ValveStateEnum currentState) { VerifyOrReturnError(Status::Success == CurrentState::Set(ep, currentState), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + DataModel::Nullable targetState = DataModel::NullNullable; + TargetState::Get(ep, targetState); + if (currentState == targetState.ValueOr(ValveStateEnum::kUnknownEnumValue)) + { + targetState = DataModel::NullNullable; + TargetState::Set(ep, targetState); + } emitValveStateChangedEvent(ep, currentState); return CHIP_NO_ERROR; } diff --git a/src/python_testing/TC_VALCC_3_1.py b/src/python_testing/TC_VALCC_3_1.py index 5f3c58d0b96cf9..295c312c37f0cb 100644 --- a/src/python_testing/TC_VALCC_3_1.py +++ b/src/python_testing/TC_VALCC_3_1.py @@ -32,12 +32,10 @@ # quiet: true # === END CI TEST ARGUMENTS === -import time - 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 +from chip.testing.matter_testing import (AttributeValue, ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, + async_test_body, default_matter_test_main) from mobly import asserts @@ -52,12 +50,16 @@ def desc_TC_VALCC_3_1(self) -> str: def steps_TC_VALCC_3_1(self) -> list[TestStep]: steps = [ TestStep(1, "Commissioning, already done", is_commissioning=True), - TestStep(2, "Send Open command"), - TestStep(3, "Read TargetState attribute"), - TestStep(4, "Read CurrentState attribute"), - TestStep(5, "Send Close command"), - TestStep(6, "Read TargetState attribute"), - TestStep(7, "Read CurrentState attribute"), + TestStep(2, "Set up a subscription to all attributes on the DUT"), + TestStep(3, "Send a close command to the DUT and wait until the CurrentState is closed", "DUT returns SUCCESS"), + TestStep(4, "Send Open command", "DUT returns SUCCESS"), + TestStep(5, "Wait until TH receives and data report for TargetState set to NULL and an attribute report for CurrentState set to Open (ordering does not matter)", + "Expected attribute reports are received"), + TestStep(6, "Read CurrentState and TargetState attribute", "CurrentState is Open, TargetState is NULL"), + TestStep(7, "Send Close command", "DUT returns SUCCESS"), + TestStep(8, "Wait until TH receives and data report for TargetState set to NULL and an attribute report for CurrentState set to Closed (ordering does not matter)", + "Expected attribute reports are received"), + TestStep(9, "Read CurrentState and TargetState attribute", "CurrentState is Closed, TargetState is NULL"), ] return steps @@ -72,62 +74,55 @@ async def test_TC_VALCC_3_1(self): endpoint = self.get_endpoint(default=1) - self.step(1) - attributes = Clusters.ValveConfigurationAndControl.Attributes + self.step(1) # commissioning - already done self.step(2) - try: - await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Open(), endpoint=endpoint) - except InteractionModelError as e: - asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") - pass + cluster = Clusters.ValveConfigurationAndControl + attributes = cluster.Attributes + attribute_subscription = ClusterAttributeChangeAccumulator(cluster) + await attribute_subscription.start(self.default_controller, self.dut_node_id, endpoint) self.step(3) - target_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetState) - - asserts.assert_true(target_state_dut is not NullValue, "TargetState is null") - asserts.assert_equal(target_state_dut, Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kOpen, - "TargetState is not the expected value") - - self.step(4) + # Wait for the entire duration of the test because this valve may be slow. The test will time out before this does. That's fine. + timeout = self.matter_test_config.timeout if self.matter_test_config.timeout is not None else self.default_timeout + await self.send_single_cmd(cmd=cluster.Commands.Close(), endpoint=endpoint) current_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) - asserts.assert_true(current_state_dut is not NullValue, "CurrentState is null") - - while current_state_dut is Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kTransitioning: - time.sleep(1) - - current_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) - asserts.assert_true(current_state_dut is not NullValue, "CurrentState is null") + if current_state_dut != cluster.Enums.ValveStateEnum.kClosed: + current_state_closed = AttributeValue( + endpoint_id=endpoint, attribute=attributes.CurrentState, value=cluster.Enums.ValveStateEnum.kClosed) + attribute_subscription.await_all_final_values_reported( + expected_final_values=[current_state_closed], timeout_sec=timeout) - asserts.assert_equal(current_state_dut, Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kOpen, - "CurrentState is not the expected value") + self.step(4) + attribute_subscription.reset() + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Open(), endpoint=endpoint) self.step(5) - try: - await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Close(), endpoint=endpoint) - except InteractionModelError as e: - asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") - pass + # Wait until the current state is open and the target state is Null. + expected_final_state = [AttributeValue(endpoint_id=endpoint, attribute=attributes.TargetState, value=NullValue), AttributeValue( + endpoint_id=endpoint, attribute=attributes.CurrentState, value=cluster.Enums.ValveStateEnum.kOpen)] + attribute_subscription.await_all_final_values_reported(expected_final_values=expected_final_state, timeout_sec=timeout) self.step(6) target_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetState) - - asserts.assert_true(target_state_dut is not NullValue, "TargetState is null") - asserts.assert_equal(target_state_dut, Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kClosed, - "TargetState is not the expected value") - - self.step(7) current_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) - asserts.assert_true(current_state_dut is not NullValue, "CurrentState is null") + asserts.assert_equal(current_state_dut, cluster.Enums.ValveStateEnum.kOpen, "CurrentState is not open") + asserts.assert_equal(target_state_dut, NullValue, "TargetState is not null") - while current_state_dut is Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kTransitioning: - time.sleep(1) + self.step(7) + attribute_subscription.reset() + await self.send_single_cmd(cmd=cluster.Commands.Close(), endpoint=endpoint) - current_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) - asserts.assert_true(current_state_dut is not NullValue, "CurrentState is null") + self.step(8) + expected_final_state = [AttributeValue(endpoint_id=endpoint, attribute=attributes.TargetState, value=NullValue), AttributeValue( + endpoint_id=endpoint, attribute=attributes.CurrentState, value=cluster.Enums.ValveStateEnum.kClosed)] + attribute_subscription.await_all_final_values_reported(expected_final_values=expected_final_state, timeout_sec=timeout) - asserts.assert_equal(current_state_dut, Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kClosed, - "CurrentState is not the expected value") + self.step(9) + target_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetState) + current_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) + asserts.assert_equal(current_state_dut, cluster.Enums.ValveStateEnum.kClosed, "CurrentState is not closed") + asserts.assert_equal(target_state_dut, NullValue, "TargetState is not null") if __name__ == "__main__": diff --git a/src/python_testing/TC_VALCC_3_2.py b/src/python_testing/TC_VALCC_3_2.py index 44dc320c0a8f33..5e22cda0ef39f0 100644 --- a/src/python_testing/TC_VALCC_3_2.py +++ b/src/python_testing/TC_VALCC_3_2.py @@ -25,6 +25,7 @@ # --commissioning-method on-network # --discriminator 1234 # --passcode 20202021 +# --endpoint 1 # --trace-to json:${TRACE_TEST_JSON}.json # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # --endpoint 1 @@ -32,13 +33,11 @@ # 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 chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import (AttributeValue, ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, + async_test_body, default_matter_test_main) from mobly import asserts @@ -53,13 +52,18 @@ def desc_TC_VALCC_3_2(self) -> str: def steps_TC_VALCC_3_2(self) -> list[TestStep]: steps = [ TestStep(1, "Commissioning, already done", is_commissioning=True), - TestStep(2, "Read FeatureMap attribute"), - TestStep(3, "Send Open command with TargetLevel set to 100"), - TestStep(4, "Read TargetLevel attribute"), - TestStep(5, "Read CurrentLevel attribute"), - TestStep(6, "Send Close command"), - TestStep(7, "Read TargetLevel attribute"), - TestStep(8, "Read CurrentLevel attribute"), + TestStep(2, "Set up a subscription to all attributes on the DUT"), + TestStep(3, "Send a close command to the DUT and wait until the CurrentState is closed", "DUT returns SUCCESS"), + TestStep(4, "TH sends command Open command with TargetLevel field set to 100 and the remaining fields not populated.", + "Verify DUT responds w/ status SUCCESS(0x00)."), + TestStep(5, "Wait until TH receives data reports for TargetState set to NULL, TargetLevel set to NULL, CurrentState set to Open and CurrentLevel set to 100 (ordering does not matter)", + "Expected attribute reports are received"), + TestStep(6, "Read CurrentState, CurrentLevel, TargetState and TargetLevel attributes", + "CurrentState is Open, CurrentLevel is 100, TargetState is NULL and TargetLevel is NULL"), + TestStep(7, "Send Close command", "DUT returns SUCCESS"), + TestStep(8, "Wait until TH receives and data report for TargetState set to NULL and an attribute report for CurrentState set to Closed (ordering does not matter)", + "Expected attribute reports are received"), + TestStep(9, "Read CurrentState and TargetState attribute", "CurrentState is Closed, TargetState is NULL"), ] return steps @@ -73,82 +77,83 @@ def pics_TC_VALCC_3_2(self) -> list[str]: async def test_TC_VALCC_3_2(self): endpoint = self.get_endpoint(default=1) + asserts.assert_is_not_none( + endpoint, "Endpoint is required for this tests. The test endpoint is set using the --endpoint flag") self.step(1) attributes = Clusters.ValveConfigurationAndControl.Attributes - - self.step(2) + # TODO: replace with top-level check using run_if_endpoint_matches feature_map = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.FeatureMap) - is_lvl_feature_supported = feature_map & Clusters.ValveConfigurationAndControl.Bitmaps.Feature.kLevel + if not is_lvl_feature_supported: + asserts.skip('Endpoint does not match test requirements') + + self.step(2) + cluster = Clusters.ValveConfigurationAndControl + attributes = cluster.Attributes + attribute_subscription = ClusterAttributeChangeAccumulator(cluster) + await attribute_subscription.start(self.default_controller, self.dut_node_id, endpoint) self.step(3) - if is_lvl_feature_supported: - try: - await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Open(targetLevel=100), endpoint=endpoint) - except InteractionModelError as e: - asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") - pass - else: - logging.info("Test step skipped") + # Wait for the entire duration of the test because this valve may be slow. The test will time out before this does. That's fine. + timeout = self.matter_test_config.timeout if self.matter_test_config.timeout is not None else self.default_timeout + await self.send_single_cmd(cmd=cluster.Commands.Close(), endpoint=endpoint) + current_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) + if current_state_dut != cluster.Enums.ValveStateEnum.kClosed: + current_state_closed = AttributeValue( + endpoint_id=endpoint, attribute=attributes.CurrentState, value=cluster.Enums.ValveStateEnum.kClosed) + attribute_subscription.await_all_final_values_reported( + expected_final_values=[current_state_closed], timeout_sec=timeout) self.step(4) - if is_lvl_feature_supported: - target_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetLevel) - - asserts.assert_true(target_level_dut is not NullValue, "TargetLevel is null") - asserts.assert_equal(target_level_dut, 100, "TargetLevel is not the expected value") - else: - logging.info("Test step skipped") + attribute_subscription.reset() + try: + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Open(targetLevel=100), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass self.step(5) - if is_lvl_feature_supported: - current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) - asserts.assert_true(current_level_dut is not NullValue, "CurrentLevel is null") - - while current_level_dut != 100: - time.sleep(1) - - current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) - asserts.assert_true(current_level_dut is not NullValue, "CurrentLevel is null") - - asserts.assert_equal(current_level_dut, 100, "CurrentLevel is not the expected value") - else: - logging.info("Test step skipped") + # Wait until the current state is open and the target state is Null. + expected_final_state = [AttributeValue(endpoint_id=endpoint, attribute=attributes.TargetState, value=NullValue), + AttributeValue(endpoint_id=endpoint, attribute=attributes.CurrentState, + value=cluster.Enums.ValveStateEnum.kOpen), + AttributeValue(endpoint_id=endpoint, attribute=attributes.TargetLevel, value=NullValue), + AttributeValue(endpoint_id=endpoint, attribute=attributes.CurrentLevel, value=100)] + attribute_subscription.await_all_final_values_reported(expected_final_values=expected_final_state, timeout_sec=timeout) self.step(6) - if is_lvl_feature_supported: - try: - await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Close(), endpoint=endpoint) - except InteractionModelError as e: - asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") - pass - else: - logging.info("Test step skipped") + target_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetState) + current_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) + target_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetLevel) + current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) + asserts.assert_equal(current_state_dut, cluster.Enums.ValveStateEnum.kOpen, "CurrentState is not open") + asserts.assert_equal(target_state_dut, NullValue, "TargetState is not null") + asserts.assert_equal(current_level_dut, 100, "CurrentLevel is not 100") + asserts.assert_equal(target_level_dut, NullValue, "TargetLevel is not null") self.step(7) - if is_lvl_feature_supported: - target_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetLevel) - - asserts.assert_true(target_level_dut is not NullValue, "TargetLevel is null") - asserts.assert_equal(target_level_dut, 0, "TargetLevel is not the expected value") - else: - logging.info("Test step skipped") + attribute_subscription.reset() + await self.send_single_cmd(cmd=cluster.Commands.Close(), endpoint=endpoint) self.step(8) - if is_lvl_feature_supported: - current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) - asserts.assert_true(current_level_dut is not NullValue, "CurrentLevel is null") - - while current_level_dut is Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kTransitioning: - time.sleep(1) - - current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) - asserts.assert_true(current_level_dut is not NullValue, "CurrentLevel is null") - - asserts.assert_equal(current_level_dut, 0, "CurrentLevel is not the expected value") - else: - logging.info("Test step skipped") + expected_final_state = [AttributeValue(endpoint_id=endpoint, attribute=attributes.TargetState, value=NullValue), + AttributeValue(endpoint_id=endpoint, attribute=attributes.CurrentState, + value=cluster.Enums.ValveStateEnum.kClosed), + AttributeValue(endpoint_id=endpoint, attribute=attributes.TargetLevel, value=NullValue), + AttributeValue(endpoint_id=endpoint, attribute=attributes.CurrentLevel, value=0)] + attribute_subscription.await_all_final_values_reported(expected_final_values=expected_final_state, timeout_sec=timeout) + attribute_subscription.await_all_final_values_reported(expected_final_values=expected_final_state, timeout_sec=timeout) + + self.step(9) + target_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetState) + current_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) + target_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetLevel) + current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) + asserts.assert_equal(current_state_dut, cluster.Enums.ValveStateEnum.kClosed, "CurrentState is not closed") + asserts.assert_equal(target_state_dut, NullValue, "TargetState is not null") + asserts.assert_equal(current_level_dut, 0, "CurrentLevel is not 0") + asserts.assert_equal(target_level_dut, NullValue, "TargetLevel is not null") if __name__ == "__main__": diff --git a/src/python_testing/TC_VALCC_3_3.py b/src/python_testing/TC_VALCC_3_3.py index 97e29f9b1a82d1..2d962c22cb651a 100644 --- a/src/python_testing/TC_VALCC_3_3.py +++ b/src/python_testing/TC_VALCC_3_3.py @@ -32,13 +32,10 @@ # 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 chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import (AttributeValue, ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, + async_test_body, default_matter_test_main) from mobly import asserts @@ -53,14 +50,22 @@ def desc_TC_VALCC_3_3(self) -> str: def steps_TC_VALCC_3_3(self) -> list[TestStep]: steps = [ TestStep(1, "Commissioning, already done", is_commissioning=True), - TestStep(2, "Read AttributeList attribute"), - TestStep(3, "Read DefaultOpenLevel attribute, if supported"), - TestStep(4, "Send Open command"), - TestStep(5, "Read TargetLevel attribute"), - TestStep(6, "Read CurrentLevel attribute"), - TestStep(7, "Send Close command"), - TestStep(8, "Read TargetLevel attribute"), - TestStep(9, "Read CurrentLevel attribute"), + TestStep(2, "Read AttributeList attribute", "Verify that the DUT response contains the AttributeList attribute."), + TestStep(3, "If the DefaultOpenLevel is not supported, skip all remaining steps in this test"), + TestStep(4, "TH reads from the DUT the DefaultOpenLevel attribute. Store the value as defaultOpenLevel."), + TestStep(5, "Set up a subscription to all attributes on the DUT", "Subscription is successful"), + TestStep(6, "Send a close command to the DUT and wait until the CurrentState is reported as closed", "DUT returns SUCCESS"), + # TODO: this test should probably SET the default open attribute as well and un-set it at the end, so we're not testing against the default. + TestStep(7, "Send Open command with no fields populated", "DUT returns SUCCESS"), + TestStep(8, "Wait until TH receives the following data reports (ordering not checked): TargetState set to NULL, TargetLevel set to NULL, CurrentState set to Open, CurrentLevel set to defaultOpenLevel", + "Expected attribute reports are received"), + TestStep(9, "Read CurrentState and TargetState attribute", "CurrentState is Open, TargetState is NULL"), + TestStep(10, "Read CurrentLevel and TargetLevel attribute", "CurrentLevel is defaultOpenLevel, TargetLevel is NULL"), + TestStep(11, "Send Close command", "DUT returns SUCCESS"), + TestStep(12, "Wait until TH receives the following data reports (ordering not checked): TargetState set to NULL, TargetLevel set to NULL, CurrentState set to Closed, CurrentLevel set to 0", + "Expected attribute reports are received"), + TestStep(13, "Read CurrentState and TargetState attribute", "CurrentState is Closed, TargetState is NULL"), + TestStep(14, "Read CurrentLevel and TargetLevel attribute", "CurrentLevel is 0, TargetLevel is NULL"), ] return steps @@ -82,78 +87,75 @@ async def test_TC_VALCC_3_3(self): attribute_list = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.AttributeList) self.step(3) - if attributes.DefaultOpenLevel.attribute_id in attribute_list: - defaultOpenLevel = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.DefaultOpenLevel) - else: - logging.info("Test step skipped") + if attributes.DefaultOpenLevel.attribute_id not in attribute_list: + asserts.skip('Endpoint does not match test requirements') self.step(4) - if attributes.DefaultOpenLevel.attribute_id in attribute_list: - try: - await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Open(), endpoint=endpoint) - except InteractionModelError as e: - asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") - pass - else: - logging.info("Test step skipped") + default_open_level = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.DefaultOpenLevel) self.step(5) - if attributes.DefaultOpenLevel.attribute_id in attribute_list: - target_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetLevel) - - asserts.assert_true(target_level_dut is not NullValue, "TargetLevel is null") - asserts.assert_equal(target_level_dut, defaultOpenLevel, "TargetLevel is not the expected value") - else: - logging.info("Test step skipped") + cluster = Clusters.ValveConfigurationAndControl + attributes = cluster.Attributes + attribute_subscription = ClusterAttributeChangeAccumulator(cluster) + await attribute_subscription.start(self.default_controller, self.dut_node_id, endpoint) self.step(6) - if attributes.DefaultOpenLevel.attribute_id in attribute_list: - current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) - asserts.assert_true(current_level_dut is not NullValue, "CurrentLevel is null") - - while current_level_dut != defaultOpenLevel: - time.sleep(1) - - current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) - asserts.assert_true(current_level_dut is not NullValue, "CurrentLevel is null") - - asserts.assert_equal(current_level_dut, defaultOpenLevel, "CurrentLevel is not the expected value") - else: - logging.info("Test step skipped") + timeout = self.matter_test_config.timeout if self.matter_test_config.timeout is not None else self.default_timeout + await self.send_single_cmd(cmd=cluster.Commands.Close(), endpoint=endpoint) + current_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) + if current_state_dut != cluster.Enums.ValveStateEnum.kClosed: + current_state_closed = AttributeValue( + endpoint_id=endpoint, attribute=attributes.CurrentState, value=cluster.Enums.ValveStateEnum.kClosed) + attribute_subscription.await_all_final_values_reported( + expected_final_values=[current_state_closed], timeout_sec=timeout) self.step(7) - if attributes.DefaultOpenLevel.attribute_id in attribute_list: - try: - await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Close(), endpoint=endpoint) - except InteractionModelError as e: - asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") - pass - else: - logging.info("Test step skipped") + attribute_subscription.reset() + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Open(), endpoint=endpoint) self.step(8) - if attributes.DefaultOpenLevel.attribute_id in attribute_list: - target_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetLevel) - - asserts.assert_true(target_level_dut is not NullValue, "TargetLevel is null") - asserts.assert_equal(target_level_dut, 0, "TargetLevel is not the expected value") - else: - logging.info("Test step skipped") + expected_final_state = [AttributeValue(endpoint_id=endpoint, attribute=attributes.TargetState, value=NullValue), + AttributeValue(endpoint_id=endpoint, attribute=attributes.CurrentState, + value=cluster.Enums.ValveStateEnum.kOpen), + AttributeValue(endpoint_id=endpoint, attribute=attributes.TargetLevel, value=NullValue), + AttributeValue(endpoint_id=endpoint, attribute=attributes.CurrentLevel, value=default_open_level)] + attribute_subscription.await_all_final_values_reported(expected_final_values=expected_final_state, timeout_sec=timeout) self.step(9) - if attributes.DefaultOpenLevel.attribute_id in attribute_list: - current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) - asserts.assert_true(current_level_dut is not NullValue, "CurrentLevel is null") - - while current_level_dut is Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kTransitioning: - time.sleep(1) - - current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) - asserts.assert_true(current_level_dut is not NullValue, "CurrentLevel is null") - - asserts.assert_equal(current_level_dut, 0, "CurrentLevel is not the expected value") - else: - logging.info("Test step skipped") + target_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetState) + current_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) + asserts.assert_equal(current_state_dut, cluster.Enums.ValveStateEnum.kOpen, "CurrentState is not open") + asserts.assert_equal(target_state_dut, NullValue, "TargetState is not null") + + self.step(10) + target_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetLevel) + current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) + asserts.assert_equal(current_level_dut, default_open_level, "CurrentLevel is not defaultOpenLevel") + asserts.assert_equal(target_level_dut, NullValue, "TargetLevel is not null") + + self.step(11) + attribute_subscription.reset() + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Close(), endpoint=endpoint) + + self.step(12) + expected_final_state = [AttributeValue(endpoint_id=endpoint, attribute=attributes.TargetState, value=NullValue), + AttributeValue(endpoint_id=endpoint, attribute=attributes.CurrentState, + value=cluster.Enums.ValveStateEnum.kClosed), + AttributeValue(endpoint_id=endpoint, attribute=attributes.TargetLevel, value=NullValue), + AttributeValue(endpoint_id=endpoint, attribute=attributes.CurrentLevel, value=0)] + attribute_subscription.await_all_final_values_reported(expected_final_values=expected_final_state, timeout_sec=timeout) + + self.step(13) + target_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetState) + current_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) + asserts.assert_equal(current_state_dut, cluster.Enums.ValveStateEnum.kClosed, "CurrentState is not open") + asserts.assert_equal(target_state_dut, NullValue, "TargetState is not null") + + self.step(14) + target_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetLevel) + current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) + asserts.assert_equal(current_level_dut, 0, "CurrentLevel is not 0") + asserts.assert_equal(target_level_dut, NullValue, "TargetLevel is not null") if __name__ == "__main__": From b49b8456d371babd14acd9ebffb0f701fddef281 Mon Sep 17 00:00:00 2001 From: Vatsal Ghelani <152916324+vatsalghelani-csa@users.noreply.github.com> Date: Fri, 13 Dec 2024 15:57:03 -0500 Subject: [PATCH 50/72] Updated spec_parsing.py to now use the data model directory from python package (#36596) * Added modified spec_parsing.py to now use the data model package * Restyled by autopep8 * Restyled by isort * Fixing the cosmetic changes * Use chip.testing as a module to extract, work via PosixPath directory * Restyled by autopep8 * Restyled by isort * Fixed correct directory search * Solving the wrapping for try-catch according to comments * Restyled by autopep8 * Added fixes for both a pre-built location or a full path * Fix comment * Restyled by autopep8 * Adding importlib.resources capability * Restyled by autopep8 * Restyled by isort * Fixed _spec_ path error * Fixed to use module as string * Removed unused import * Added fixes for path issues * Fixing the xml not found error * Restyled by autopep8 * Fixed code lint error * Fixed code lint error tree * Fixed importlib errors * Fixed code lint * Fixed errors * Restyled by autopep8 * Some type updates and iteration logic updates to be consistent * Remove unused method * Fix logic to match existing usage: we need clusters to be part of the passed in path if applicable * Restyled by autopep8 * Restyled by isort * remove unused import * Cleanup some odd comments * Another update to avoid using globs * Fix up types and return * Remove unused import * Another dep cleanup * Remove one test step: unclear about the value of throwing a specparse exception on invalid input type * Remove unused import * update logic to throw specparsing when no XMLs found ... this preserves previous logic somewhat * Make data model directory consistent with cluster logic * Comments update * Added warning levels for checking xml --------- Co-authored-by: Restyled.io Co-authored-by: Andrei Litvin Co-authored-by: Andrei Litvin --- src/python_testing/TestSpecParsingSupport.py | 5 +- .../chip/testing/spec_parsing.py | 143 +++++++++++------- 2 files changed, 91 insertions(+), 57 deletions(-) diff --git a/src/python_testing/TestSpecParsingSupport.py b/src/python_testing/TestSpecParsingSupport.py index b4c908c232fa94..7ab5847a276883 100644 --- a/src/python_testing/TestSpecParsingSupport.py +++ b/src/python_testing/TestSpecParsingSupport.py @@ -21,7 +21,7 @@ import jinja2 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, +from chip.testing.spec_parsing import (ClusterParser, DataModelLevel, PrebuiltDataModelDirectory, 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 @@ -276,9 +276,6 @@ def test_build_xml_override(self): 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") - def test_spec_parsing_access(self): strs = [None, 'view', 'operate', 'manage', 'admin'] for read in strs: diff --git a/src/python_testing/matter_testing_infrastructure/chip/testing/spec_parsing.py b/src/python_testing/matter_testing_infrastructure/chip/testing/spec_parsing.py index 97a13606eabc45..3607f515d3a9ec 100644 --- a/src/python_testing/matter_testing_infrastructure/chip/testing/spec_parsing.py +++ b/src/python_testing/matter_testing_infrastructure/chip/testing/spec_parsing.py @@ -15,15 +15,16 @@ # limitations under the License. # -import glob +import importlib +import importlib.resources as pkg_resources import logging -import os import typing import xml.etree.ElementTree as ElementTree from copy import deepcopy from dataclasses import dataclass from enum import Enum, auto -from typing import Callable, Optional +from importlib.abc import Traversable +from typing import Callable, Optional, Union import chip.clusters as Clusters import chip.testing.conformance as conformance_support @@ -512,56 +513,83 @@ class PrebuiltDataModelDirectory(Enum): k1_4 = auto() kMaster = auto() - -class DataModelLevel(str, Enum): - kCluster = 'clusters' - kDeviceType = 'device_types' - - -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(_get_data_model_root(), '1.3', data_model_level) - elif data_model_directory == PrebuiltDataModelDirectory.k1_4: - return os.path.join(_get_data_model_root(), '1.4', data_model_level) - elif data_model_directory == PrebuiltDataModelDirectory.kMaster: - return os.path.join(_get_data_model_root(), 'master', data_model_level) + @property + def dirname(self): + if self == PrebuiltDataModelDirectory.k1_3: + return "1.3" + if self == PrebuiltDataModelDirectory.k1_4: + return "1.4" + if self == PrebuiltDataModelDirectory.kMaster: + return "master" + raise KeyError("Invalid enum: %r" % self) + + +class DataModelLevel(Enum): + kCluster = auto() + kDeviceType = auto() + + @property + def dirname(self): + if self == DataModelLevel.kCluster: + return "clusters" + if self == DataModelLevel.kDeviceType: + return "device_types" + raise KeyError("Invalid enum: %r" % self) + + +def get_data_model_directory(data_model_directory: Union[PrebuiltDataModelDirectory, Traversable], data_model_level: DataModelLevel = DataModelLevel.kCluster) -> Traversable: + """ + Get the directory of the data model for a specific version and level from the installed package. + + + `data_model_directory` given as a path MUST be of type Traversable (often `pathlib.Path(somepathstring)`). + If `data_model_directory` is given as a Traversable, it is returned directly WITHOUT using the data_model_level at all. + """ + # If it's a prebuilt directory, build the path based on the version and data model level + if isinstance(data_model_directory, PrebuiltDataModelDirectory): + return pkg_resources.files(importlib.import_module('chip.testing')).joinpath( + 'data_model').joinpath(data_model_directory.dirname).joinpath(data_model_level.dirname) 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) +def build_xml_clusters(data_model_directory: Union[PrebuiltDataModelDirectory, Traversable] = PrebuiltDataModelDirectory.k1_4) -> typing.Tuple[dict[int, dict], list]: + """ + Build XML clusters from the specified data model directory. + This function supports both pre-built locations and full paths. + + `data_model_directory`` given as a path MUST be of type Traversable (often `pathlib.Path(somepathstring)`). + If data_model_directory is a Travesable, it is assumed to already contain `clusters` (i.e. be a directory + with all XML files in it) + """ clusters: dict[int, XmlCluster] = {} pure_base_clusters: dict[str, XmlCluster] = {} ids_by_name: dict[str, int] = {} problems: list[ProblemNotice] = [] - files = glob.glob(f'{dir}/*.xml') - if not files: - raise SpecParsingException(f'No data model files found in specified directory {dir}') - for xml in files: - logging.info(f'Parsing file {xml}') - tree = ElementTree.parse(f'{xml}') - root = tree.getroot() - add_cluster_data_from_xml(root, clusters, pure_base_clusters, ids_by_name, problems) + top = get_data_model_directory(data_model_directory, DataModelLevel.kCluster) + logging.info("Reading XML clusters from %r", top) + + found_xmls = 0 + for f in top.iterdir(): + if not f.name.endswith('.xml'): + logging.info("Ignoring non-XML file %s", f.name) + continue + + logging.info('Parsing file %s', f.name) + found_xmls += 1 + with f.open("r", encoding="utf8") as file: + root = ElementTree.parse(file).getroot() + add_cluster_data_from_xml(root, clusters, pure_base_clusters, ids_by_name, problems) + + # For now we assume even a single XML means the directory was probaly OK + # we may increase this later as most our data model directories are larger + # + # Intent here is to make user aware of typos in paths instead of silently having + # empty parsing + if found_xmls < 1: + raise SpecParsingException(f'No data model files found in specified directory {top:!r}') # There are a few clusters where the conformance columns are listed as desc. These clusters need specific, targeted tests # to properly assess conformance. Here, we list them as Optional to allow these for the general test. Targeted tests are described below. @@ -721,7 +749,7 @@ def combine_attributes(base: dict[uint, XmlAttribute], derived: dict[uint, XmlAt xml_clusters[id] = new -def parse_single_device_type(root: ElementTree.Element) -> tuple[list[ProblemNotice], dict[int, XmlDeviceType]]: +def parse_single_device_type(root: ElementTree.Element) -> tuple[dict[int, XmlDeviceType], list[ProblemNotice]]: problems: list[ProblemNotice] = [] device_types: dict[int, XmlDeviceType] = {} device = root.iter('deviceType') @@ -793,17 +821,26 @@ def parse_single_device_type(root: ElementTree.Element) -> tuple[list[ProblemNot return device_types, problems -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) +def build_xml_device_types(data_model_directory: typing.Union[PrebuiltDataModelDirectory, Traversable] = PrebuiltDataModelDirectory.k1_4) -> tuple[dict[int, XmlDeviceType], list[ProblemNotice]]: + top = get_data_model_directory(data_model_directory, DataModelLevel.kDeviceType) device_types: dict[int, XmlDeviceType] = {} problems = [] - for xml in glob.glob(f"{dir}/*.xml"): - logging.info(f'Parsing file {xml}') - tree = ElementTree.parse(f'{xml}') - root = tree.getroot() - tmp_device_types, tmp_problems = parse_single_device_type(root) - problems = problems + tmp_problems - device_types.update(tmp_device_types) + + found_xmls = 0 + + for file in top.iterdir(): + if not file.name.endswith('.xml'): + continue + logging.info('Parsing file %r / %s', top, file.name) + found_xmls += 1 + with file.open('r', encoding="utf8") as xml: + root = ElementTree.parse(xml).getroot() + tmp_device_types, tmp_problems = parse_single_device_type(root) + problems = problems + tmp_problems + device_types.update(tmp_device_types) + + if found_xmls < 1: + logging.warning("No XML files found in the specified device type directory: %r", top) if -1 not in device_types.keys(): raise ConformanceException("Base device type not found in device type xml data") From cfdaf799a6761799828108febe2c6a6fd5747470 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 13 Dec 2024 19:41:07 -0500 Subject: [PATCH 51/72] Ensure we create a clean subscription on _deviceMayBeReachable. (#36842) Just clear out all existing subscription/session state when this API is called. Callers should ensure there are no spurious calls. --- .../Framework/CHIP/MTRDevice_Concrete.mm | 72 +++++++++++++------ 1 file changed, 51 insertions(+), 21 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm index 996e41ff12cf2d..264a268e253163 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm +++ b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm @@ -871,13 +871,7 @@ - (void)invalidate // tear down the subscription. We will get no more callbacks from // the subscription after this point. std::lock_guard lock(self->_lock); - self->_currentReadClient = nullptr; - if (self->_currentSubscriptionCallback) { - delete self->_currentSubscriptionCallback; - } - self->_currentSubscriptionCallback = nullptr; - - [self _changeInternalState:MTRInternalDeviceStateUnsubscribed]; + [self _resetSubscription]; } errorHandler:nil]; @@ -938,8 +932,8 @@ - (void)_triggerResubscribeWithReason:(NSString *)reason nodeLikelyReachable:(BO } readClientToResubscribe->TriggerResubscribeIfScheduled(reason.UTF8String); } else if (_internalDeviceState == MTRInternalDeviceStateSubscribing && nodeLikelyReachable) { - // If we have reason to suspect that the node is now reachable and we haven’t established a - // CASE session yet, let’s consider it to be stalled and invalidate the pairing session. + // If we have reason to suspect that the node is now reachable and we haven't established a + // CASE session yet, let's consider it to be stalled and invalidate the pairing session. [self._concreteController asyncGetCommissionerOnMatterQueue:^(Controller::DeviceCommissioner * commissioner) { auto caseSessionMgr = commissioner->CASESessionMgr(); VerifyOrDie(caseSessionMgr != nullptr); @@ -1164,7 +1158,7 @@ - (void)_handleSubscriptionError:(NSError *)error [self _doHandleSubscriptionError:error]; } -- (void)_doHandleSubscriptionError:(NSError *)error +- (void)_doHandleSubscriptionError:(nullable NSError *)error { assertChipStackLockedByCurrentThread(); @@ -1305,7 +1299,13 @@ - (void)_handleResubscriptionNeededWithDelay:(NSNumber *)resubscriptionDelayMs // Change our state before going async. [self _changeState:MTRDeviceStateUnknown]; - [self _changeInternalState:MTRInternalDeviceStateResubscribing]; + + // If we have never had a subscription established, stay in the Subscribing + // state; don't transition to Resubscribing just because our attempt at + // subscribing failed. + if (HadSubscriptionEstablishedOnce(self->_internalDeviceState)) { + [self _changeInternalState:MTRInternalDeviceStateResubscribing]; + } dispatch_async(self.queue, ^{ [self _handleResubscriptionNeededWithDelayOnDeviceQueue:resubscriptionDelayMs]; @@ -2444,19 +2444,29 @@ - (void)_resetSubscriptionWithReasonString:(NSString *)reasonString MTR_LOG("%@ subscription reset disconnecting ReadClient and SubscriptionCallback", self); std::lock_guard lock(self->_lock); - self->_currentReadClient = nullptr; - if (self->_currentSubscriptionCallback) { - delete self->_currentSubscriptionCallback; - } - self->_currentSubscriptionCallback = nullptr; - [self _doHandleSubscriptionError:nil]; + [self _resetSubscription]; + // Use nil reset delay so that this keeps existing backoff timing [self _doHandleSubscriptionReset:nil]; } errorHandler:nil]; } +- (void)_resetSubscription +{ + assertChipStackLockedByCurrentThread(); + os_unfair_lock_assert_owner(&_lock); + + _currentReadClient = nullptr; + if (_currentSubscriptionCallback) { + delete _currentSubscriptionCallback; + _currentSubscriptionCallback = nullptr; + } + + [self _doHandleSubscriptionError:nil]; +} + #ifdef DEBUG - (void)unitTestResetSubscription { @@ -4322,11 +4332,31 @@ - (BOOL)_deviceHasActiveSubscription - (void)_deviceMayBeReachable { - MTR_LOG("%@ _deviceMayBeReachable called", self); + MTR_LOG("%@ _deviceMayBeReachable called, resetting subscription", self); // TODO: This should only be allowed for thread devices - [_deviceController asyncDispatchToMatterQueue:^{ - [self _triggerResubscribeWithReason:@"SPI client indicated the device may now be reachable" - nodeLikelyReachable:YES]; + [self._concreteController asyncGetCommissionerOnMatterQueue:^(Controller::DeviceCommissioner * commissioner) { + // Reset all of our subscription/session state and re-establish it all + // from the start. Reset our subscription first, before tearing + // down the session, so we don't have to worry about the + // notifications from the latter coming through async and + // complicating the situation. Unfortunately, we do not want to + // hold the lock when destroying the session, just in case it still + // ends up calling into us somehow, so we have to break the work up + // into two separate locked sections... + { + std::lock_guard lock(self->_lock); + [self _clearSubscriptionPoolWork]; + [self _resetSubscription]; + } + + auto caseSessionMgr = commissioner->CASESessionMgr(); + VerifyOrDie(caseSessionMgr != nullptr); + caseSessionMgr->ReleaseSession(commissioner->GetPeerScopedId(self->_nodeID.unsignedLongLongValue)); + + std::lock_guard lock(self->_lock); + // Use _ensureSubscriptionForExistingDelegates so that the subscriptions + // will go through the pool as needed, not necessarily happen immediately. + [self _ensureSubscriptionForExistingDelegates:@"SPI client indicated the device may now be reachable"]; } errorHandler:nil]; } From 9451aa5dd3c1c928d296492dff14ae24dca072ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Mon, 16 Dec 2024 16:12:58 +0100 Subject: [PATCH 52/72] Update spec_clusters.md (#36850) Fix script reference --- docs/ids_and_codes/spec_clusters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ids_and_codes/spec_clusters.md b/docs/ids_and_codes/spec_clusters.md index 43db0725793a8a..2500e7de00ee2f 100644 --- a/docs/ids_and_codes/spec_clusters.md +++ b/docs/ids_and_codes/spec_clusters.md @@ -1,5 +1,5 @@ # List of currently defined spec clusters -This file was **AUTOMATICALLY** generated by `python scripts/generate_spec_xml.py`. DO NOT EDIT BY HAND! +This file was **AUTOMATICALLY** generated. Refer to this page: [data_model](/data_model/README.md). DO NOT EDIT BY HAND! | ID (Decimal) | ID (hex) | Name | |--------------|----------|----------------------------------------------------------| From d162e3a92f1033bff9d6d8675bb7b961b8c1d8a7 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Mon, 16 Dec 2024 16:33:10 +0100 Subject: [PATCH 53/72] Bash completion for chip example applications (#36841) --- scripts/helpers/bash-completion.sh | 104 ++++++++++++++++++++++++----- 1 file changed, 89 insertions(+), 15 deletions(-) diff --git a/scripts/helpers/bash-completion.sh b/scripts/helpers/bash-completion.sh index 6737f2149cc5f9..26239419d3e587 100644 --- a/scripts/helpers/bash-completion.sh +++ b/scripts/helpers/bash-completion.sh @@ -28,6 +28,58 @@ _chip_tool_get_options() { "$@" --help 2>&1 | awk -F'[[]|[]]' '/^[[]--/{ print $2 }' } +_chip_app() { + + local cur prev words cword split + _init_completion -s || return + + case "$prev" in + --ble-device) + readarray -t words < <(ls -I '*:*' /sys/class/bluetooth) + # Get the list of Bluetooth devices without the 'hci' prefix. + readarray -t COMPREPLY < <(compgen -W "${words[*]#hci}" -- "$cur") + return + ;; + --custom-flow) + readarray -t COMPREPLY < <(compgen -W "0 1 2" -- "$cur") + return + ;; + --capabilities) + # The capabilities option is a bit-field with 3 bits currently defined. + readarray -t COMPREPLY < <(compgen -W "001 010 011 100 101 111" -- "$cur") + return + ;; + --KVS) + _filedir + return + ;; + --PICS) + _filedir + return + ;; + --trace_file) + _filedir + return + ;; + --trace_log | --trace_decode) + readarray -t COMPREPLY < <(compgen -W "0 1" -- "$cur") + return + ;; + --trace-to) + readarray -t COMPREPLY < <(compgen -W "json perfetto" -- "$cur") + compopt -o nospace + return + ;; + esac + + case "$cur" in + -*) + readarray -t COMPREPLY < <(compgen -W "$(_parse_help "$1")" -- "$cur") + ;; + esac + +} + _chip_tool() { local cur prev words cword split @@ -36,34 +88,56 @@ _chip_tool() { # Get command line arguments up to the cursor position local args=("${COMP_WORDS[@]:0:$cword+1}") - local command=0 case "$prev" in --commissioner-name) readarray -t COMPREPLY < <(compgen -W "alpha beta gamma 4 5 6 7 8 9" -- "$cur") + return + ;; + --only-allow-trusted-cd-keys) + readarray -t COMPREPLY < <(compgen -W "0 1" -- "$cur") + return ;; - --paa-trust-store-path | --cd-trust-store-path) + --paa-trust-store-path | --cd-trust-store-path | --dac-revocation-set-path) _filedir -d + return ;; --storage-directory) _filedir -d + return ;; - *) - command=1 + --trace-to) + readarray -t COMPREPLY < <(compgen -W "json perfetto" -- "$cur") + compopt -o nospace + return ;; esac - if [ "$command" -eq 1 ]; then - case "$cur" in - -*) - words=$(_chip_tool_get_options "${args[@]}") - ;; - *) - words=$(_chip_tool_get_commands "${args[@]}") - ;; - esac - readarray -t COMPREPLY < <(compgen -W "$words" -- "$cur") - fi + case "$cur" in + -*) + words=$(_chip_tool_get_options "${args[@]}") + ;; + *) + words=$(_chip_tool_get_commands "${args[@]}") + ;; + esac + readarray -t COMPREPLY < <(compgen -W "$words" -- "$cur") } +complete -F _chip_app chip-air-purifier-app +complete -F _chip_app chip-all-clusters-app +complete -F _chip_app chip-bridge-app +complete -F _chip_app chip-dishwasher-app +complete -F _chip_app chip-energy-management-app +complete -F _chip_app chip-lighting-app +complete -F _chip_app chip-lock-app +complete -F _chip_app chip-log-source-app +complete -F _chip_app chip-microwave-oven-app +complete -F _chip_app chip-ota-provider-app +complete -F _chip_app chip-ota-requestor-app +complete -F _chip_app chip-refrigerator-app +complete -F _chip_app chip-rvc-app +complete -F _chip_app chip-tv-app +complete -F _chip_app chip-tv-casting-app + complete -F _chip_tool chip-tool From 43f66f00b084dac758021c8e1779cc7bf1603133 Mon Sep 17 00:00:00 2001 From: Wang Qixiang <43193572+wqx6@users.noreply.github.com> Date: Tue, 17 Dec 2024 01:07:09 +0800 Subject: [PATCH 54/72] Make XOccupiedToUnoccupiedDelay attributes in OccupancySensing cluster managed by AAI (#36777) * Make XOccupiedToUnoccupiedDelay attributes managed by AAI * add document * add more document --- .../all-clusters-app.matter | 4 +- .../placeholder/linux/apps/app1/config.matter | 6 +- .../placeholder/linux/apps/app2/config.matter | 6 +- .../occupancy-sensor-server.cpp | 14 +- .../zcl/zcl-with-test-extensions.json | 9 +- src/app/zap-templates/zcl/zcl.json | 9 +- .../zap-generated/attributes/Accessors.cpp | 141 ------------------ .../zap-generated/attributes/Accessors.h | 18 --- 8 files changed, 30 insertions(+), 177 deletions(-) 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 fb770209b996a3..071a3fcf7c5b76 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 @@ -9047,7 +9047,7 @@ endpoint 1 { ram attribute occupancySensorTypeBitmap default = 1; callback attribute holdTime; callback attribute holdTimeLimits; - ram attribute PIROccupiedToUnoccupiedDelay default = 10; + callback attribute PIROccupiedToUnoccupiedDelay; callback attribute featureMap; ram attribute clusterRevision default = 5; } @@ -9505,7 +9505,7 @@ endpoint 2 { ram attribute occupancySensorTypeBitmap default = 1; callback attribute holdTime; callback attribute holdTimeLimits; - ram attribute PIROccupiedToUnoccupiedDelay default = 10; + callback attribute PIROccupiedToUnoccupiedDelay; callback attribute featureMap; ram attribute clusterRevision default = 5; } diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index a6a1aa5c7f5a64..fe5fe0bfe6d84b 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -9645,13 +9645,13 @@ endpoint 1 { ram attribute occupancy; ram attribute occupancySensorType; ram attribute occupancySensorTypeBitmap; - ram attribute PIROccupiedToUnoccupiedDelay default = 0x00; + callback attribute PIROccupiedToUnoccupiedDelay; ram attribute PIRUnoccupiedToOccupiedDelay default = 0x00; ram attribute PIRUnoccupiedToOccupiedThreshold default = 1; - ram attribute ultrasonicOccupiedToUnoccupiedDelay default = 0x00; + callback attribute ultrasonicOccupiedToUnoccupiedDelay; ram attribute ultrasonicUnoccupiedToOccupiedDelay default = 0x00; ram attribute ultrasonicUnoccupiedToOccupiedThreshold default = 1; - ram attribute physicalContactOccupiedToUnoccupiedDelay default = 0x00; + callback attribute physicalContactOccupiedToUnoccupiedDelay; ram attribute physicalContactUnoccupiedToOccupiedDelay default = 0x00; ram attribute physicalContactUnoccupiedToOccupiedThreshold default = 1; callback attribute featureMap; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 0373748d9de69e..68de2f9ffba90e 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -9540,13 +9540,13 @@ endpoint 1 { ram attribute occupancy; ram attribute occupancySensorType; ram attribute occupancySensorTypeBitmap; - ram attribute PIROccupiedToUnoccupiedDelay default = 0x00; + callback attribute PIROccupiedToUnoccupiedDelay; ram attribute PIRUnoccupiedToOccupiedDelay default = 0x00; ram attribute PIRUnoccupiedToOccupiedThreshold default = 1; - ram attribute ultrasonicOccupiedToUnoccupiedDelay default = 0x00; + callback attribute ultrasonicOccupiedToUnoccupiedDelay; ram attribute ultrasonicUnoccupiedToOccupiedDelay default = 0x00; ram attribute ultrasonicUnoccupiedToOccupiedThreshold default = 1; - ram attribute physicalContactOccupiedToUnoccupiedDelay default = 0x00; + callback attribute physicalContactOccupiedToUnoccupiedDelay; ram attribute physicalContactUnoccupiedToOccupiedDelay default = 0x00; ram attribute physicalContactUnoccupiedToOccupiedThreshold default = 1; callback attribute featureMap; diff --git a/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp b/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp index cd7ba5b8f659c2..03eaaa46475d1c 100644 --- a/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp +++ b/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp @@ -59,8 +59,12 @@ CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValu case Attributes::FeatureMap::Id: ReturnErrorOnFailure(aEncoder.Encode(mFeature)); break; - case Attributes::HoldTime::Id: { - + case Attributes::HoldTime::Id: + case Attributes::PIROccupiedToUnoccupiedDelay::Id: + case Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id: + case Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id: { + // HoldTime is equivalent to the legacy *OccupiedToUnoccupiedDelay attributes. + // The AAI will read/write these attributes at the same storage for one endpoint. uint16_t * holdTime = GetHoldTimeForEndpoint(aPath.mEndpointId); if (holdTime == nullptr) @@ -190,12 +194,6 @@ CHIP_ERROR SetHoldTime(EndpointId endpointId, uint16_t newHoldTime) MatterReportingAttributeChangeCallback(endpointId, OccupancySensing::Id, Attributes::HoldTime::Id); } - // Blindly try to write RAM-backed legacy attributes (will fail silently if absent) - // to keep them in sync. - (void) Attributes::PIROccupiedToUnoccupiedDelay::Set(endpointId, newHoldTime); - (void) Attributes::UltrasonicOccupiedToUnoccupiedDelay::Set(endpointId, newHoldTime); - (void) Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Set(endpointId, newHoldTime); - return CHIP_NO_ERROR; } 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 0912be1df2db37..14179bb5566bfc 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -294,7 +294,14 @@ "ClientsSupportedPerFabric", "MaximumCheckInBackOff" ], - "Occupancy Sensing": ["HoldTimeLimits", "HoldTime", "FeatureMap"], + "Occupancy Sensing": [ + "HoldTimeLimits", + "HoldTime", + "PIROccupiedToUnoccupiedDelay", + "UltrasonicOccupiedToUnoccupiedDelay", + "PhysicalContactOccupiedToUnoccupiedDelay", + "FeatureMap" + ], "Operational Credentials": [ "SupportedFabrics", "CommissionedFabrics", diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 3a62c4c84ca6eb..728d3acdad1f06 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -288,7 +288,14 @@ "ClientsSupportedPerFabric", "MaximumCheckInBackOff" ], - "Occupancy Sensing": ["HoldTimeLimits", "HoldTime", "FeatureMap"], + "Occupancy Sensing": [ + "HoldTimeLimits", + "HoldTime", + "PIROccupiedToUnoccupiedDelay", + "UltrasonicOccupiedToUnoccupiedDelay", + "PhysicalContactOccupiedToUnoccupiedDelay", + "FeatureMap" + ], "Operational Credentials": [ "SupportedFabrics", "CommissionedFabrics", diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index afb3da76dc8bc3..10f67cad3ffd77 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -32754,53 +32754,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, } // namespace OccupancySensorTypeBitmap -namespace PIROccupiedToUnoccupiedDelay { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - *value = Traits::StorageToWorking(temp); - return status; -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OccupancySensing::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace PIROccupiedToUnoccupiedDelay - namespace PIRUnoccupiedToOccupiedDelay { Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) @@ -32895,53 +32848,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) } // namespace PIRUnoccupiedToOccupiedThreshold -namespace UltrasonicOccupiedToUnoccupiedDelay { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - *value = Traits::StorageToWorking(temp); - return status; -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OccupancySensing::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace UltrasonicOccupiedToUnoccupiedDelay - namespace UltrasonicUnoccupiedToOccupiedDelay { Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) @@ -33036,53 +32942,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) } // namespace UltrasonicUnoccupiedToOccupiedThreshold -namespace PhysicalContactOccupiedToUnoccupiedDelay { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - *value = Traits::StorageToWorking(temp); - return status; -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OccupancySensing::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace PhysicalContactOccupiedToUnoccupiedDelay - namespace PhysicalContactUnoccupiedToOccupiedDelay { Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index c79c0657c5b11b..d77633d6d72bbc 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -4913,12 +4913,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, MarkAttributeDirty markDirty); } // namespace OccupancySensorTypeBitmap -namespace PIROccupiedToUnoccupiedDelay { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -} // namespace PIROccupiedToUnoccupiedDelay - namespace PIRUnoccupiedToOccupiedDelay { Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); @@ -4931,12 +4925,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace PIRUnoccupiedToOccupiedThreshold -namespace UltrasonicOccupiedToUnoccupiedDelay { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -} // namespace UltrasonicOccupiedToUnoccupiedDelay - namespace UltrasonicUnoccupiedToOccupiedDelay { Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); @@ -4949,12 +4937,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace UltrasonicUnoccupiedToOccupiedThreshold -namespace PhysicalContactOccupiedToUnoccupiedDelay { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -} // namespace PhysicalContactOccupiedToUnoccupiedDelay - namespace PhysicalContactUnoccupiedToOccupiedDelay { Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); From 33dda32476a032eb96ff42e442ffea2a39871d28 Mon Sep 17 00:00:00 2001 From: Jake Ororke Date: Mon, 16 Dec 2024 13:02:13 -0800 Subject: [PATCH 55/72] [Fix] Possible fix for matter-test-scripts issue #227: Remove PICS from OPSTATE tests (#34290) * Possible fix for matter-test-scripts issue #227: - Removed PICS checks and replaced with attribute and command checks from endpoint during tests. * Restyled by autopep8 * Updated TC_OpstateCommon.py: - Removed some variables that were no longer needed * Updated TC_RVCOPSTATE_2_1 test module: - Removed automatable PICS checks and replaced with attributes available to be gathered from endpoint. * Restyled by autopep8 * Restyled by isort * Updated TC_RVCOPSTATE_2_1 test module: - Adding back in missing time import and test runner comments into test module * Updated TC_RVCOPSTATE_2_1 test module: - Replaced input() with wait_for_user_input() in test script - Added back in short sleep to script, not sure why it got removed. * Resolving Linting issue in TC_RVCOPSTATE_2_1: - Had to remove "test_step" variable that was attempting to be called in wait_for_user_input() as it was not being defined earlier in the test module. * Updating TC_RVCOPSTATE_2_1 test module: - Minor change to remove unneeded f-string from wait_for_user_input(). * Updated TC_RVCOPSTATE_2_1 test module: - Re-imported the test_step variable for test steps 6 and 7 manual testing that were accidentally removed - Re-imported the variable being called in the self.wait_for_user_input() * Updated TC_RVCOPSTATE_2_1 test module: - Replaced missing test_step variable and calls for it in self.wait_for_user_input() * Restyled by autopep8 * Updated TC_OpstateCommon and TC_RVCOPSTATE_2_1: - Removed oprtnlstate_attr_id variable and if statements as it is a mandatory attribute. - Created new common functions in OpstateCommon test module to create dictionary containing attributes and commands. - Renamed some variables that had upper case letters to contain only lower case letters. - Removed creating variable for events and returned PICS checks for those in TC_OpstateCommon test module as not currently able to automate * Restyled by autopep8 * Updated TC_OpstateCommon module: - Removed unneeded local variable "phase_list_attr_id" as lint mentioned it is not being used in test 2_3. * Updated TC_OpstateCommon and TC_RVCOPSTATE_2_1: - Removed variable functions and replaced with calling named attributes in if checks directly. * Restyled by autopep8 * Updated matter_testing_support, OpstateCommon, and RVCOPSTATE_2_1 modules: - Added attributes_guard to matter_testing_support helper module to check if attributes are in attributes list using has_attributes function - Changed attributes checks to using attributes_guard function in OpstateCommon and RVCOPSTATE_2_1 test modules * Restyled by autopep8 * Restyled by isort * Updated TC_OpstateCommon.py: - Resolved linting errors * Updating method for attributes_guard functionality * Updated TC_RVCOPSTATE_2_1 test module: - Debugging to find issue why test is failing in CI pipeline. * Updating TC_RVCOPSTATE_2_1 test module: - Continuing effort to resolve issue with CI pipeline * Updated TC_OpstateCommon, TC_RVCOPSTATE_2_1, and matter_testing support: - Resolved issues with attributes_guard function in matter_testing support module * Restyled by autopep8 * Updated TC_RVCOPSTATE_2_1 test module: - changed verbosity in CI arguments to make it quieter. * Updating matter_testing support module: - Updated attributes_guard function to make it async * Updating TC_OpstateCommon and TC_RVCOPSTATE_2_1 test modules: - Updated method for attributes_guard functionality. - Added additional check to make sure that endpoint is not 0 or not provided in command line * Restyled by autopep8 * Updated matter_testing helper module: - Resolved linting error * Updating TC_RVCOPSTATE_2_1 test module: - Resolving linting error * Update src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py Adding coding change from Cecille! Co-authored-by: C Freeman * Updating OPSTATECommon and RVCOPSTATE_2_1 modules: - Updated to using attribute_guard function in place of attributes_guard. * Updated matter_testing, added new TC_TestAttrAvail modules: - Updated matter_testing support module to include new command_guard() and feature_guard() - Created standalone test to show that guard functionality works for CASE, PASE, and no factory reset commissioning - Added TC_TestAttrAvail to slow tests as it takes ~30 seconds to run the tests * Restyled by autopep8 * Restyled by isort * Updated TC_OpstateCommon python module: - Updated to using new command_guard() for OPSTATE tests * Updated matter_testing, TC_OpstateCommon, and TC_TestAttrAvail modules: - Resolving linting errors * Restyled by isort * Update src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py Adding commi from Cecille to the code here to help better clarify and explain reasoning for this coding change. Co-authored-by: C Freeman --------- Co-authored-by: Restyled.io Co-authored-by: C Freeman --- src/python_testing/TC_OpstateCommon.py | 335 ++++++++---------- src/python_testing/TC_RVCOPSTATE_2_1.py | 17 +- src/python_testing/TC_TestAttrAvail.py | 164 +++++++++ .../chip/testing/matter_testing.py | 101 ++++++ src/python_testing/test_metadata.yaml | 1 + 5 files changed, 433 insertions(+), 185 deletions(-) create mode 100644 src/python_testing/TC_TestAttrAvail.py diff --git a/src/python_testing/TC_OpstateCommon.py b/src/python_testing/TC_OpstateCommon.py index 557b7606ccbea3..1a4cfbe7150e30 100644 --- a/src/python_testing/TC_OpstateCommon.py +++ b/src/python_testing/TC_OpstateCommon.py @@ -210,8 +210,8 @@ def STEPS_TC_OPSTATE_BASE_1_1(self) -> list[TestStep]: async def TEST_TC_OPSTATE_BASE_1_1(self, endpoint=1, cluster_revision=1, feature_map=0): cluster = self.test_info.cluster attributes = cluster.Attributes - events = cluster.Events commands = cluster.Commands + events = cluster.Events self.init_test() @@ -245,7 +245,7 @@ async def TEST_TC_OPSTATE_BASE_1_1(self, endpoint=1, cluster_revision=1, feature attributes.ClusterRevision.attribute_id ] - if self.check_pics(f"{self.test_info.pics_code}.S.A0002"): + if await self.attribute_guard(endpoint=endpoint, attribute=attributes.CountdownTime): expected_value.append(attributes.CountdownTime.attribute_id) await self.read_and_expect_array_contains(endpoint=endpoint, @@ -259,7 +259,7 @@ async def TEST_TC_OPSTATE_BASE_1_1(self, endpoint=1, cluster_revision=1, feature events.OperationalError.event_id, ] - if self.check_pics(f"{self.test_info.pics_code}.S.E01"): + if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.E01")): expected_value.append(events.OperationCompletion.event_id) await self.read_and_expect_array_contains(endpoint=endpoint, @@ -270,19 +270,19 @@ async def TEST_TC_OPSTATE_BASE_1_1(self, endpoint=1, cluster_revision=1, feature self.step(6) expected_value = [] - if (self.check_pics(f"{self.test_info.pics_code}.S.C00.Rsp") or - self.check_pics(f"{self.test_info.pics_code}.S.C03.Rsp")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Pause)) or + (await self.command_guard(endpoint=endpoint, command=commands.Resume))): expected_value.append(commands.Pause.command_id) - if (self.check_pics(f"{self.test_info.pics_code}.S.C01.Rsp") or - self.check_pics(f"{self.test_info.pics_code}.S.C02.Rsp")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Stop)) or + (await self.command_guard(endpoint=endpoint, command=commands.Start))): expected_value.append(commands.Stop.command_id) - if self.check_pics(f"{self.test_info.pics_code}.S.C02.Rsp"): + if await self.command_guard(endpoint=endpoint, command=commands.Start): expected_value.append(commands.Start.command_id) - if (self.check_pics(f"{self.test_info.pics_code}.S.C03.Rsp") or - self.check_pics(f"{self.test_info.pics_code}.S.C00.Rsp")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Pause)) or + (await self.command_guard(endpoint=endpoint, command=commands.Resume))): expected_value.append(commands.Resume.command_id) await self.read_and_expect_array_contains(endpoint=endpoint, @@ -293,10 +293,10 @@ async def TEST_TC_OPSTATE_BASE_1_1(self, endpoint=1, cluster_revision=1, feature self.step(7) expected_value = [] - if (self.check_pics(f"{self.test_info.pics_code}.S.C00.Rsp") or - self.check_pics(f"{self.test_info.pics_code}.S.C01.Rsp") or - self.check_pics(f"{self.test_info.pics_code}.S.C02.Rsp") or - self.check_pics(f"{self.test_info.pics_code}.S.C03.Rsp")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Pause)) or + (await self.command_guard(endpoint=endpoint, command=commands.Resume)) or + (await self.command_guard(endpoint=endpoint, command=commands.Stop)) or + (await self.command_guard(endpoint=endpoint, command=commands.Start))): expected_value.append(commands.OperationalCommandResponse.command_id) await self.read_and_expect_array_contains(endpoint=endpoint, @@ -344,7 +344,7 @@ async def TEST_TC_OPSTATE_BASE_2_1(self, endpoint=1): # STEP 2: TH reads from the DUT the PhaseList attribute self.step(2) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0000")): + if await self.attribute_guard(endpoint=endpoint, attribute=attributes.PhaseList): phase_list = await self.read_expect_success(endpoint=endpoint, attribute=attributes.PhaseList) if phase_list is not NullValue: @@ -354,7 +354,7 @@ async def TEST_TC_OPSTATE_BASE_2_1(self, endpoint=1): # STEP 3: TH reads from the DUT the CurrentPhase attribute self.step(3) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0001")): + if await self.attribute_guard(endpoint=endpoint, attribute=attributes.CurrentPhase): current_phase = await self.read_expect_success(endpoint=endpoint, attribute=attributes.CurrentPhase) if (phase_list == NullValue) or (not phase_list): @@ -366,7 +366,7 @@ async def TEST_TC_OPSTATE_BASE_2_1(self, endpoint=1): # STEP 4: TH reads from the DUT the CountdownTime attribute self.step(4) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0002")): + if await self.attribute_guard(endpoint=endpoint, attribute=attributes.CountdownTime): countdown_time = await self.read_expect_success(endpoint=endpoint, attribute=attributes.CountdownTime) if countdown_time is not NullValue: @@ -375,7 +375,7 @@ async def TEST_TC_OPSTATE_BASE_2_1(self, endpoint=1): # STEP 5: TH reads from the DUT the OperationalStateList attribute self.step(5) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0003")): + if await self.attribute_guard(endpoint=endpoint, attribute=attributes.OperationalStateList): operational_state_list = await self.read_expect_success(endpoint=endpoint, attribute=attributes.OperationalStateList) defined_states = [state.value for state in cluster.Enums.OperationalStateEnum @@ -396,73 +396,72 @@ async def TEST_TC_OPSTATE_BASE_2_1(self, endpoint=1): # STEP 6: TH reads from the DUT the OperationalState attribute self.step(6) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0004")): - operational_state = await self.read_expect_success(endpoint=endpoint, - attribute=attributes.OperationalState) - in_range = (0x80 <= operational_state <= 0xBF) - asserts.assert_true(operational_state in defined_states or in_range, - "OperationalState has an invalid ID value!") - - # STEP 6a: Manually put the device in the Stopped(0x00) operational state - self.step("6a") - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.M.ST_STOPPED")): - self.send_manual_or_pipe_command(name="OperationalStateChange", - device=self.device, - operation="Stop") - # STEP 6b: TH reads from the DUT the OperationalState attribute - self.step("6b") - await self.read_and_expect_value(endpoint=endpoint, - attribute=attributes.OperationalState, - expected_value=cluster.Enums.OperationalStateEnum.kStopped) - else: - self.skip_step("6b") + operational_state = await self.read_expect_success(endpoint=endpoint, + attribute=attributes.OperationalState) + in_range = (0x80 <= operational_state <= 0xBF) + asserts.assert_true(operational_state in defined_states or in_range, + "OperationalState has an invalid ID value!") + + # STEP 6a: Manually put the device in the Stopped(0x00) operational state + self.step("6a") + if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.M.ST_STOPPED")): + self.send_manual_or_pipe_command(name="OperationalStateChange", + device=self.device, + operation="Stop") + # STEP 6b: TH reads from the DUT the OperationalState attribute + self.step("6b") + await self.read_and_expect_value(endpoint=endpoint, + attribute=attributes.OperationalState, + expected_value=cluster.Enums.OperationalStateEnum.kStopped) + else: + self.skip_step("6b") - # STEP 6c: Manually put the device in the Running(0x01) operational state - self.step("6c") - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.M.ST_RUNNING")): - self.send_manual_or_pipe_command(name="OperationalStateChange", - device=self.device, - operation="Start") - # STEP 6d: TH reads from the DUT the OperationalState attribute - self.step("6d") - await self.read_and_expect_value(endpoint=endpoint, - attribute=attributes.OperationalState, - expected_value=cluster.Enums.OperationalStateEnum.kRunning) - else: - self.skip_step("6d") + # STEP 6c: Manually put the device in the Running(0x01) operational state + self.step("6c") + if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.M.ST_RUNNING")): + self.send_manual_or_pipe_command(name="OperationalStateChange", + device=self.device, + operation="Start") + # STEP 6d: TH reads from the DUT the OperationalState attribute + self.step("6d") + await self.read_and_expect_value(endpoint=endpoint, + attribute=attributes.OperationalState, + expected_value=cluster.Enums.OperationalStateEnum.kRunning) + else: + self.skip_step("6d") - # STEP 6e: Manually put the device in the Paused(0x02) operational state - self.step("6e") - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.M.ST_PAUSED")): - self.send_manual_or_pipe_command(name="OperationalStateChange", - device=self.device, - operation="Pause") - # STEP 6f: TH reads from the DUT the OperationalState attribute - self.step("6f") - await self.read_and_expect_value(endpoint=endpoint, - attribute=attributes.OperationalState, - expected_value=cluster.Enums.OperationalStateEnum.kPaused) - else: - self.skip_step("6f") + # STEP 6e: Manually put the device in the Paused(0x02) operational state + self.step("6e") + if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.M.ST_PAUSED")): + self.send_manual_or_pipe_command(name="OperationalStateChange", + device=self.device, + operation="Pause") + # STEP 6f: TH reads from the DUT the OperationalState attribute + self.step("6f") + await self.read_and_expect_value(endpoint=endpoint, + attribute=attributes.OperationalState, + expected_value=cluster.Enums.OperationalStateEnum.kPaused) + else: + self.skip_step("6f") - # STEP 6g: Manually put the device in the Error(0x03) operational state - self.step("6g") - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.M.ST_ERROR")): - self.send_manual_or_pipe_command(name="OperationalStateChange", - device=self.device, - operation="OnFault", - param=cluster.Enums.ErrorStateEnum.kUnableToStartOrResume) - # STEP 6h: TH reads from the DUT the OperationalState attribute - self.step("6h") - await self.read_and_expect_value(endpoint=endpoint, - attribute=attributes.OperationalState, - expected_value=cluster.Enums.OperationalStateEnum.kError) - else: - self.skip_step("6h") + # STEP 6g: Manually put the device in the Error(0x03) operational state + self.step("6g") + if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.M.ST_ERROR")): + self.send_manual_or_pipe_command(name="OperationalStateChange", + device=self.device, + operation="OnFault", + param=cluster.Enums.ErrorStateEnum.kUnableToStartOrResume) + # STEP 6h: TH reads from the DUT the OperationalState attribute + self.step("6h") + await self.read_and_expect_value(endpoint=endpoint, + attribute=attributes.OperationalState, + expected_value=cluster.Enums.OperationalStateEnum.kError) + else: + self.skip_step("6h") # STEP 7: TH reads from the DUT the OperationalError attribute self.step(7) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0005")): + if await self.attribute_guard(endpoint=endpoint, attribute=attributes.OperationalError): operational_error = await self.read_expect_success(endpoint=endpoint, attribute=attributes.OperationalError) # Defined Errors @@ -566,7 +565,9 @@ def STEPS_TC_OPSTATE_BASE_2_2(self) -> list[TestStep]: async def TEST_TC_OPSTATE_BASE_2_2(self, endpoint=1): cluster = self.test_info.cluster attributes = cluster.Attributes + commands = cluster.Commands + generated_cmd_list = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attributes.GeneratedCommandList) self.init_test() @@ -595,7 +596,7 @@ async def TEST_TC_OPSTATE_BASE_2_2(self, endpoint=1): # STEP 3: TH reads from the DUT the OperationalStateList attribute self.step(3) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0003")): + if await self.attribute_guard(endpoint=endpoint, attribute=attributes.OperationalStateList): operational_state_list = await self.read_expect_success(endpoint=endpoint, attribute=attributes.OperationalStateList) @@ -610,22 +611,20 @@ async def TEST_TC_OPSTATE_BASE_2_2(self, endpoint=1): # STEP 4: TH sends Start command to the DUT self.step(4) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.C02.Rsp") and - self.check_pics(f"{self.test_info.pics_code}.S.C04.Tx")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Start)) and (commands.OperationalCommandResponse.command_id in generated_cmd_list)): await self.send_cmd_expect_response(endpoint=endpoint, cmd=commands.Start(), expected_response=cluster.Enums.ErrorStateEnum.kNoError) # STEP 5: TH reads from the DUT the OperationalState attribute self.step(5) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0004")): - await self.read_and_expect_value(endpoint=endpoint, - attribute=attributes.OperationalState, - expected_value=cluster.Enums.OperationalStateEnum.kRunning) + await self.read_and_expect_value(endpoint=endpoint, + attribute=attributes.OperationalState, + expected_value=cluster.Enums.OperationalStateEnum.kRunning) # STEP 6: TH reads from the DUT the OperationalError attribute self.step(6) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0005")): + if await self.attribute_guard(endpoint=endpoint, attribute=attributes.OperationalError): await self.read_and_expect_property_value(endpoint=endpoint, attribute=attributes.OperationalError, attr_property="errorStateID", @@ -633,7 +632,7 @@ async def TEST_TC_OPSTATE_BASE_2_2(self, endpoint=1): # STEP 7: TH reads from the DUT the CountdownTime attribute self.step(7) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0002")): + if await self.attribute_guard(endpoint=endpoint, attribute=attributes.CountdownTime): initial_countdown_time = await self.read_expect_success(endpoint=endpoint, attribute=attributes.CountdownTime) if initial_countdown_time is not NullValue: @@ -642,7 +641,7 @@ async def TEST_TC_OPSTATE_BASE_2_2(self, endpoint=1): # STEP 8: TH reads from the DUT the PhaseList attribute self.step(8) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0000")): + if await self.attribute_guard(endpoint=endpoint, attribute=attributes.PhaseList): phase_list = await self.read_expect_success(endpoint=endpoint, attribute=attributes.PhaseList) phase_list_len = 0 @@ -653,7 +652,7 @@ async def TEST_TC_OPSTATE_BASE_2_2(self, endpoint=1): # STEP 9: TH reads from the DUT the CurrentPhase attribute self.step(9) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0001")): + if await self.attribute_guard(endpoint=endpoint, attribute=attributes.CurrentPhase): current_phase = await self.read_expect_success(endpoint=endpoint, attribute=attributes.CurrentPhase) if (phase_list == NullValue) or (not phase_list): @@ -666,12 +665,12 @@ async def TEST_TC_OPSTATE_BASE_2_2(self, endpoint=1): # STEP 10: TH waits for {PIXIT.WAITTIME.COUNTDOWN} self.step(10) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0002")): + if await self.attribute_guard(endpoint=endpoint, attribute=attributes.CountdownTime): time.sleep(wait_time) # STEP 11: TH reads from the DUT the CountdownTime attribute self.step(11) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0002")): + if await self.attribute_guard(endpoint=endpoint, attribute=attributes.CountdownTime): countdown_time = await self.read_expect_success(endpoint=endpoint, attribute=attributes.CountdownTime) @@ -683,31 +682,27 @@ async def TEST_TC_OPSTATE_BASE_2_2(self, endpoint=1): # STEP 12: TH sends Start command to the DUT self.step(12) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.C02.Rsp") and - self.check_pics(f"{self.test_info.pics_code}.S.C04.Tx")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Start)) and (commands.OperationalCommandResponse.command_id in generated_cmd_list)): await self.send_cmd_expect_response(endpoint=endpoint, cmd=commands.Start(), expected_response=cluster.Enums.ErrorStateEnum.kNoError) # STEP 13: TH sends Stop command to the DUT self.step(13) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.C01.Rsp") and - self.check_pics(f"{self.test_info.pics_code}.S.C04.Tx")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Stop)) and (commands.OperationalCommandResponse.command_id in generated_cmd_list)): await self.send_cmd_expect_response(endpoint=endpoint, cmd=commands.Stop(), expected_response=cluster.Enums.ErrorStateEnum.kNoError) # STEP 14: TH reads from the DUT the OperationalState attribute self.step(14) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0004")): - await self.read_and_expect_value(endpoint=endpoint, - attribute=attributes.OperationalState, - expected_value=cluster.Enums.OperationalStateEnum.kStopped) + await self.read_and_expect_value(endpoint=endpoint, + attribute=attributes.OperationalState, + expected_value=cluster.Enums.OperationalStateEnum.kStopped) # STEP 15: TH sends Stop command to the DUT self.step(15) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.C01.Rsp") and - self.check_pics(f"{self.test_info.pics_code}.S.C04.Tx")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Stop)) and (commands.OperationalCommandResponse.command_id in generated_cmd_list)): await self.send_cmd_expect_response(endpoint=endpoint, cmd=commands.Stop(), expected_response=cluster.Enums.ErrorStateEnum.kNoError) @@ -722,9 +717,9 @@ async def TEST_TC_OPSTATE_BASE_2_2(self, endpoint=1): # STEP 17: TH sends Start command to the DUT self.step(17) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.M.ERR_UNABLE_TO_START_OR_RESUME") and - self.check_pics(f"{self.test_info.pics_code}.S.C02.Rsp") and - self.check_pics(f"{self.test_info.pics_code}.S.C04.Tx")): + if self.pics_guard((self.check_pics(f"{self.test_info.pics_code}.S.M.ERR_UNABLE_TO_START_OR_RESUME")) and + ((await self.command_guard(endpoint=endpoint, command=commands.Start)) and + (commands.OperationalCommandResponse.command_id in generated_cmd_list))): await self.send_cmd_expect_response(endpoint=endpoint, cmd=commands.Start(), expected_response=cluster.Enums.ErrorStateEnum.kUnableToStartOrResume) @@ -757,7 +752,9 @@ def STEPS_TC_OPSTATE_BASE_2_3(self) -> list[TestStep]: async def TEST_TC_OPSTATE_BASE_2_3(self, endpoint=1): cluster = self.test_info.cluster attributes = cluster.Attributes + commands = cluster.Commands + generated_cmd_list = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attributes.GeneratedCommandList) self.init_test() @@ -786,37 +783,34 @@ async def TEST_TC_OPSTATE_BASE_2_3(self, endpoint=1): # STEP 3: TH reads from the DUT the OperationalStateList attribute self.step(3) - if self.pics_guard(self.check_pics((f"{self.test_info.pics_code}.S.A0003"))): - operational_state_list = await self.read_expect_success(endpoint=endpoint, - attribute=attributes.OperationalStateList) + operational_state_list = await self.read_expect_success(endpoint=endpoint, + attribute=attributes.OperationalStateList) - operational_state_list_ids = [op_state.operationalStateID for op_state in operational_state_list] + operational_state_list_ids = [op_state.operationalStateID for op_state in operational_state_list] - defined_states = [state.value for state in cluster.Enums.OperationalStateEnum - if state != cluster.Enums.OperationalStateEnum.kUnknownEnumValue] + defined_states = [state.value for state in cluster.Enums.OperationalStateEnum + if state != cluster.Enums.OperationalStateEnum.kUnknownEnumValue] - for state in defined_states: - if state not in operational_state_list_ids: - asserts.fail(f"The list shall include structs with the following OperationalStateIds: {defined_states}") + for state in defined_states: + if state not in operational_state_list_ids: + asserts.fail(f"The list shall include structs with the following OperationalStateIds: {defined_states}") # STEP 4: TH sends Pause command to the DUT self.step(4) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.C00.Rsp") and - self.check_pics(f"{self.test_info.pics_code}.S.C04.Tx")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Pause)) and (commands.OperationalCommandResponse.command_id in generated_cmd_list)): await self.send_cmd_expect_response(endpoint=endpoint, cmd=commands.Pause(), expected_response=cluster.Enums.ErrorStateEnum.kNoError) # STEP 5: TH reads from the DUT the OperationalState attribute self.step(5) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0004")): - await self.read_and_expect_value(endpoint=endpoint, - attribute=attributes.OperationalState, - expected_value=cluster.Enums.OperationalStateEnum.kPaused) + await self.read_and_expect_value(endpoint=endpoint, + attribute=attributes.OperationalState, + expected_value=cluster.Enums.OperationalStateEnum.kPaused) # STEP 6: TH reads from the DUT the CountdownTime attribute self.step(6) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0002")): + if await self.attribute_guard(endpoint=endpoint, attribute=attributes.CountdownTime): initial_countdown_time = await self.read_expect_success(endpoint=endpoint, attribute=attributes.CountdownTime) if initial_countdown_time is not NullValue: @@ -830,7 +824,7 @@ async def TEST_TC_OPSTATE_BASE_2_3(self, endpoint=1): # STEP 8: TH reads from the DUT the CountdownTime attribute self.step(8) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0002")): + if await self.attribute_guard(endpoint=endpoint, attribute=attributes.CountdownTime): countdown_time = await self.read_expect_success(endpoint=endpoint, attribute=attributes.CountdownTime) @@ -842,31 +836,27 @@ async def TEST_TC_OPSTATE_BASE_2_3(self, endpoint=1): # STEP 9: TH sends Pause command to the DUT self.step(9) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.C00.Rsp") and - self.check_pics(f"{self.test_info.pics_code}.S.C04.Tx")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Pause)) and (commands.OperationalCommandResponse.command_id in generated_cmd_list)): await self.send_cmd_expect_response(endpoint=endpoint, cmd=commands.Pause(), expected_response=cluster.Enums.ErrorStateEnum.kNoError) # STEP 10: TH sends Resume command to the DUT self.step(10) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.C03.Rsp") and - self.check_pics(f"{self.test_info.pics_code}.S.C04.Tx")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Resume)) and (commands.OperationalCommandResponse.command_id in generated_cmd_list)): await self.send_cmd_expect_response(endpoint=endpoint, cmd=commands.Resume(), expected_response=cluster.Enums.ErrorStateEnum.kNoError) # STEP 11: TH reads from the DUT the OperationalState attribute self.step(11) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0004")): - await self.read_and_expect_value(endpoint=endpoint, - attribute=attributes.OperationalState, - expected_value=cluster.Enums.OperationalStateEnum.kRunning) + await self.read_and_expect_value(endpoint=endpoint, + attribute=attributes.OperationalState, + expected_value=cluster.Enums.OperationalStateEnum.kRunning) # STEP 12: TH sends Resume command to the DUT self.step(12) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.C03.Rsp") and - self.check_pics(f"{self.test_info.pics_code}.S.C04.Tx")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Resume)) and (commands.OperationalCommandResponse.command_id in generated_cmd_list)): await self.send_cmd_expect_response(endpoint=endpoint, cmd=commands.Resume(), expected_response=cluster.Enums.ErrorStateEnum.kNoError) @@ -880,16 +870,14 @@ async def TEST_TC_OPSTATE_BASE_2_3(self, endpoint=1): # STEP 14: TH sends Pause command to the DUT self.step(14) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.C00.Rsp") and - self.check_pics(f"{self.test_info.pics_code}.S.C04.Tx")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Pause)) and (commands.OperationalCommandResponse.command_id in generated_cmd_list)): await self.send_cmd_expect_response(endpoint=endpoint, cmd=commands.Pause(), expected_response=cluster.Enums.ErrorStateEnum.kCommandInvalidInState) # STEP 15: TH sends Resume command to the DUT self.step(15) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.C03.Rsp") and - self.check_pics(f"{self.test_info.pics_code}.S.C04.Tx")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Resume)) and (commands.OperationalCommandResponse.command_id in generated_cmd_list)): await self.send_cmd_expect_response(endpoint=endpoint, cmd=commands.Resume(), expected_response=cluster.Enums.ErrorStateEnum.kCommandInvalidInState) @@ -904,16 +892,14 @@ async def TEST_TC_OPSTATE_BASE_2_3(self, endpoint=1): # STEP 17: TH sends Pause command to the DUT self.step(17) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.C00.Rsp") and - self.check_pics(f"{self.test_info.pics_code}.S.C04.Tx")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Pause)) and (commands.OperationalCommandResponse.command_id in generated_cmd_list)): await self.send_cmd_expect_response(endpoint=endpoint, cmd=commands.Pause(), expected_response=cluster.Enums.ErrorStateEnum.kCommandInvalidInState) # STEP 18: TH sends Resume command to the DUT self.step(18) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.C03.Rsp") and - self.check_pics(f"{self.test_info.pics_code}.S.C04.Tx")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Resume)) and (commands.OperationalCommandResponse.command_id in generated_cmd_list)): await self.send_cmd_expect_response(endpoint=endpoint, cmd=commands.Resume(), expected_response=cluster.Enums.ErrorStateEnum.kCommandInvalidInState) @@ -946,7 +932,7 @@ async def TEST_TC_OPSTATE_BASE_2_4(self, endpoint=1): # STEP 1: Commission DUT to TH (can be skipped if done in a preceding test) self.step(1) - if self.pics_guard(error_event_gen): + if error_event_gen: # STEP 2: Set up a subscription to the OperationalError event self.step(2) # Subscribe to Events and when they are sent push them to a queue for checking later @@ -976,10 +962,11 @@ async def TEST_TC_OPSTATE_BASE_2_4(self, endpoint=1): # STEP 4: TH reads from the DUT the OperationalState attribute self.step(4) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0004")): - await self.read_and_expect_value(endpoint=endpoint, - attribute=attributes.OperationalState, - expected_value=cluster.Enums.OperationalStateEnum.kError) + + await self.read_and_expect_value(endpoint=endpoint, + attribute=attributes.OperationalState, + expected_value=cluster.Enums.OperationalStateEnum.kError) + else: self.skip_step(2) self.skip_step(3) @@ -1017,7 +1004,10 @@ def STEPS_TC_OPSTATE_BASE_2_5(self) -> list[TestStep]: async def TEST_TC_OPSTATE_BASE_2_5(self, endpoint=1): cluster = self.test_info.cluster attributes = cluster.Attributes + commands = cluster.Commands + generated_cmd_list = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attributes.GeneratedCommandList) + events = cluster.Events self.init_test() @@ -1058,25 +1048,23 @@ async def TEST_TC_OPSTATE_BASE_2_5(self, endpoint=1): # STEP 4: TH sends Start command to the DUT self.step(4) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.C02.Rsp") and - self.check_pics(f"{self.test_info.pics_code}.S.C04.Tx")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Start)) and (commands.OperationalCommandResponse.command_id in generated_cmd_list)): await self.send_cmd_expect_response(endpoint=endpoint, cmd=commands.Start(), expected_response=cluster.Enums.ErrorStateEnum.kNoError) # STEP 5: TH reads from the DUT the CountdownTime attribute self.step(5) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0002")): + if await self.attribute_guard(endpoint=endpoint, attribute=attributes.CountdownTime): initial_countdown_time = await self.read_expect_success(endpoint=endpoint, attribute=attributes.CountdownTime) if initial_countdown_time is not NullValue: # STEP 6: TH reads from the DUT the OperationalState attribute self.step(6) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0004")): - await self.read_and_expect_value(endpoint=endpoint, - attribute=attributes.OperationalState, - expected_value=cluster.Enums.OperationalStateEnum.kRunning) + await self.read_and_expect_value(endpoint=endpoint, + attribute=attributes.OperationalState, + expected_value=cluster.Enums.OperationalStateEnum.kRunning) # STEP 7: TH waits for initial-countdown-time self.step(7) @@ -1085,8 +1073,7 @@ async def TEST_TC_OPSTATE_BASE_2_5(self, endpoint=1): # STEP 8: TH sends Stop command to the DUT self.step(8) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.C01.Rsp") and - self.check_pics(f"{self.test_info.pics_code}.S.C04.Tx")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Stop)) and (commands.OperationalCommandResponse.command_id in generated_cmd_list)): await self.send_cmd_expect_response(endpoint=endpoint, cmd=commands.Stop(), expected_response=cluster.Enums.ErrorStateEnum.kNoError) @@ -1109,10 +1096,9 @@ async def TEST_TC_OPSTATE_BASE_2_5(self, endpoint=1): # STEP 10: TH reads from the DUT the OperationalState attribute self.step(10) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0004")): - await self.read_and_expect_value(endpoint=endpoint, - attribute=attributes.OperationalState, - expected_value=cluster.Enums.OperationalStateEnum.kStopped) + await self.read_and_expect_value(endpoint=endpoint, + attribute=attributes.OperationalState, + expected_value=cluster.Enums.OperationalStateEnum.kStopped) # STEP 11: Restart DUT self.step(11) @@ -1135,33 +1121,29 @@ async def TEST_TC_OPSTATE_BASE_2_5(self, endpoint=1): # STEP 13: TH sends Start command to the DUT self.step(13) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.C02.Rsp") and - self.check_pics(f"{self.test_info.pics_code}.S.C04.Tx")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Start)) and (commands.OperationalCommandResponse.command_id in generated_cmd_list)): await self.send_cmd_expect_response(endpoint=endpoint, cmd=commands.Start(), expected_response=cluster.Enums.ErrorStateEnum.kNoError) # STEP 14: TH reads from the DUT the OperationalState attribute self.step(14) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0004")): - await self.read_and_expect_value(endpoint=endpoint, - attribute=attributes.OperationalState, - expected_value=cluster.Enums.OperationalStateEnum.kRunning) + await self.read_and_expect_value(endpoint=endpoint, + attribute=attributes.OperationalState, + expected_value=cluster.Enums.OperationalStateEnum.kRunning) # STEP 15: TH sends Pause command to the DUT self.step(15) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.C00.Rsp") and - self.check_pics(f"{self.test_info.pics_code}.S.C04.Tx")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Pause)) and (commands.OperationalCommandResponse.command_id in generated_cmd_list)): await self.send_cmd_expect_response(endpoint=endpoint, cmd=commands.Pause(), expected_response=cluster.Enums.ErrorStateEnum.kNoError) # STEP 16: TH reads from the DUT the OperationalState attribute self.step(16) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0004")): - await self.read_and_expect_value(endpoint=endpoint, - attribute=attributes.OperationalState, - expected_value=cluster.Enums.OperationalStateEnum.kPaused) + await self.read_and_expect_value(endpoint=endpoint, + attribute=attributes.OperationalState, + expected_value=cluster.Enums.OperationalStateEnum.kPaused) # STEP 17: TH waits for half of initial-countdown-time self.step(17) @@ -1169,18 +1151,16 @@ async def TEST_TC_OPSTATE_BASE_2_5(self, endpoint=1): # STEP 18: TH sends Resume command to the DUT self.step(18) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.C03.Rsp") and - self.check_pics(f"{self.test_info.pics_code}.S.C04.Tx")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Resume)) and (commands.OperationalCommandResponse.command_id in generated_cmd_list)): await self.send_cmd_expect_response(endpoint=endpoint, cmd=commands.Resume(), expected_response=cluster.Enums.ErrorStateEnum.kNoError) # STEP 19: TH reads from the DUT the OperationalState attribute self.step(19) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.A0004")): - await self.read_and_expect_value(endpoint=endpoint, - attribute=attributes.OperationalState, - expected_value=cluster.Enums.OperationalStateEnum.kRunning) + await self.read_and_expect_value(endpoint=endpoint, + attribute=attributes.OperationalState, + expected_value=cluster.Enums.OperationalStateEnum.kRunning) # STEP 20: TH waits for initial-countdown-time self.step(20) @@ -1188,8 +1168,7 @@ async def TEST_TC_OPSTATE_BASE_2_5(self, endpoint=1): # STEP 21: TH sends Stop command to the DUT self.step(21) - if self.pics_guard(self.check_pics(f"{self.test_info.pics_code}.S.C01.Rsp") and - self.check_pics(f"{self.test_info.pics_code}.S.C04.Tx")): + if ((await self.command_guard(endpoint=endpoint, command=commands.Stop)) and (commands.OperationalCommandResponse.command_id in generated_cmd_list)): await self.send_cmd_expect_response(endpoint=endpoint, cmd=commands.Stop(), expected_response=cluster.Enums.ErrorStateEnum.kNoError) diff --git a/src/python_testing/TC_RVCOPSTATE_2_1.py b/src/python_testing/TC_RVCOPSTATE_2_1.py index 428aa9a5ab14fd..4fc63fbe236632 100644 --- a/src/python_testing/TC_RVCOPSTATE_2_1.py +++ b/src/python_testing/TC_RVCOPSTATE_2_1.py @@ -85,6 +85,8 @@ def TC_RVCOPSTATE_2_1(self) -> list[str]: @async_test_body async def test_TC_RVCOPSTATE_2_1(self): + if self.matter_test_config.endpoint is None or self.matter_test_config.endpoint == 0: + asserts.fail("--endpoint must be set and not set to 0 for this test to run correctly.") self.endpoint = self.get_endpoint() asserts.assert_false(self.endpoint is None, "--endpoint must be included on the command line in.") self.is_ci = self.check_pics("PICS_SDK_CI_ONLY") @@ -94,7 +96,8 @@ async def test_TC_RVCOPSTATE_2_1(self): asserts.fail("The --app-pid flag must be set when PICS_SDK_CI_ONLY is set") self.app_pipe = self.app_pipe + str(app_pid) - attributes = Clusters.RvcOperationalState.Attributes + cluster = Clusters.RvcOperationalState + attributes = cluster.Attributes self.print_step(1, "Commissioning, already done") @@ -102,7 +105,7 @@ async def test_TC_RVCOPSTATE_2_1(self): if self.is_ci: self.write_to_app_pipe({"Name": "Reset"}) - if self.check_pics("RVCOPSTATE.S.A0000"): + if await self.attribute_guard(endpoint=self.endpoint, attribute=attributes.PhaseList): self.print_step(2, "Read PhaseList attribute") phase_list = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.PhaseList) @@ -115,7 +118,7 @@ async def test_TC_RVCOPSTATE_2_1(self): asserts.assert_less_equal(phase_list_len, 32, "PhaseList length(%d) must be less than 32!" % phase_list_len) - if self.check_pics("RVCOPSTATE.S.A0001"): + if await self.attribute_guard(endpoint=self.endpoint, attribute=attributes.CurrentPhase): self.print_step(3, "Read CurrentPhase attribute") current_phase = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentPhase) logging.info("CurrentPhase: %s" % (current_phase)) @@ -126,7 +129,7 @@ async def test_TC_RVCOPSTATE_2_1(self): asserts.assert_true(0 <= current_phase < phase_list_len, "CurrentPhase(%s) must be between 0 and %d" % (current_phase, (phase_list_len - 1))) - if self.check_pics("RVCOPSTATE.S.A0002"): + if await self.attribute_guard(endpoint=self.endpoint, attribute=attributes.CountdownTime): self.print_step(4, "Read CountdownTime attribute") countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CountdownTime) @@ -136,7 +139,7 @@ async def test_TC_RVCOPSTATE_2_1(self): asserts.assert_true(countdown_time >= 0 and countdown_time <= 259200, "CountdownTime(%s) must be between 0 and 259200" % countdown_time) - if self.check_pics("RVCOPSTATE.S.A0003"): + if await self.attribute_guard(endpoint=self.endpoint, attribute=attributes.OperationalStateList): self.print_step(5, "Read OperationalStateList attribute") operational_state_list = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.OperationalStateList) @@ -159,7 +162,7 @@ async def test_TC_RVCOPSTATE_2_1(self): asserts.assert_true(error_state_present, "The OperationalStateList does not have an ID entry of Error(0x03)") - if self.check_pics("RVCOPSTATE.S.A0004"): + if await self.attribute_guard(endpoint=self.endpoint, attribute=attributes.OperationalState): self.print_step(6, "Read OperationalState attribute") operational_state = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.OperationalState) @@ -226,7 +229,7 @@ async def test_TC_RVCOPSTATE_2_1(self): self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") await self.read_and_validate_opstate(step="6n", expected_state=Clusters.RvcOperationalState.Enums.OperationalStateEnum.kDocked) - if self.check_pics("RVCOPSTATE.S.A0005"): + if await self.attribute_guard(endpoint=self.endpoint, attribute=attributes.OperationalError): self.print_step(7, "Read OperationalError attribute") operational_error = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.OperationalError) diff --git a/src/python_testing/TC_TestAttrAvail.py b/src/python_testing/TC_TestAttrAvail.py new file mode 100644 index 00000000000000..b2fc40eae600c6 --- /dev/null +++ b/src/python_testing/TC_TestAttrAvail.py @@ -0,0 +1,164 @@ +# +# 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. +# + +# 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 +# --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 +# --endpoint 1 +# factory-reset: true +# quiet: true +# run2: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --passcode 20202021 --KVS kvs1 +# script-args: > +# --storage-path admin_storage.json +# --discriminator 1234 +# --passcode 20202021 +# --endpoint 1 +# --commissioning-method on-network +# factory-reset: true +# quiet: true +# run3: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 +# script-args: > +# --storage-path admin_storage.json +# --endpoint 1 +# --discriminator 1234 +# --passcode 20202021 +# factory-reset: false +# quiet: true +# === END CI TEST ARGUMENTS === + +# Run 1: Tests PASE connection using manual code +# Run 2: Tests CASE connection using manual discriminator and passcode +# Run 3: Tests without factory reset + +import asyncio + +import chip.clusters as Clusters +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + + +class TC_TestAttrAvail(MatterBaseTest): + # Using get_code and a modified version of setup_class_helper functions from chip.testing.basic_composition module + def get_code(self, dev_ctrl): + created_codes = [] + for idx, discriminator in enumerate(self.matter_test_config.discriminators): + created_codes.append(dev_ctrl.CreateManualCode(discriminator, self.matter_test_config.setup_passcodes[idx])) + + setup_codes = self.matter_test_config.qr_code_content + self.matter_test_config.manual_code + created_codes + if not setup_codes: + return None + asserts.assert_equal(len(setup_codes), 1, + "Require exactly one of either --qr-code, --manual-code or (--discriminator and --passcode).") + return setup_codes[0] + + async def setup_class_helper(self, allow_pase: bool = True): + dev_ctrl = self.default_controller + self.problems = [] + + node_id = self.dut_node_id + + task_list = [] + if allow_pase and self.get_code(dev_ctrl): + setup_code = self.get_code(dev_ctrl) + pase_future = dev_ctrl.EstablishPASESession(setup_code, self.dut_node_id) + task_list.append(asyncio.create_task(pase_future)) + + case_future = dev_ctrl.GetConnectedDevice(nodeid=node_id, allowPASE=False) + task_list.append(asyncio.create_task(case_future)) + + for task in task_list: + asyncio.ensure_future(task) + + done, pending = await asyncio.wait(task_list, return_when=asyncio.FIRST_COMPLETED) + + for task in pending: + try: + task.cancel() + await task + except asyncio.CancelledError: + pass + + wildcard_read = (await dev_ctrl.Read(node_id, [()])) + + # ======= State kept for use by all tests ======= + # All endpoints in "full object" indexing format + self.endpoints = wildcard_read.attributes + + def steps_TC_TestAttrAvail(self) -> list[TestStep]: + return [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep(2, "Checking OperationalState attribute is available on endpoint"), + TestStep(3, "Checking Operational Resume command is available on endpoint"), + TestStep(4, "Checking Timezone feature is available on endpoint"), + ] + + def TC_TestAttrAvail(self) -> list[str]: + return ["RVCOPSTATE.S"] + + @async_test_body + async def setup_class(self): + super().setup_class() + await self.setup_class_helper() + + # ======= START OF ACTUAL TESTS ======= + @async_test_body + async def test_TC_TestAttrAvail(self): + self.step(1) + + if self.matter_test_config.endpoint is None or self.matter_test_config.endpoint == 0: + asserts.fail("--endpoint must be set and not set to 0 for this test to run correctly.") + self.endpoint = self.get_endpoint() + asserts.assert_false(self.endpoint is None, "--endpoint must be included on the command line in.") + + cluster = Clusters.RvcOperationalState + attributes = cluster.Attributes + commands = cluster.Commands + self.th1 = self.default_controller + + self.step(2) + attr_should_be_there = await self.attribute_guard(endpoint=self.endpoint, attribute=attributes.OperationalState) + asserts.assert_true(attr_should_be_there, True) + self.print_step("Operational State Attr", attr_should_be_there) + + self.step(3) + cmd_should_be_there = await self.command_guard(endpoint=self.endpoint, command=commands.Resume) + asserts.assert_true(cmd_should_be_there, True) + self.print_step("Operational Resume Command available ", cmd_should_be_there) + + self.step(4) + feat_should_be_there = await self.feature_guard(endpoint=self.endpoint, cluster=Clusters.BooleanStateConfiguration, feature_int=Clusters.BooleanStateConfiguration.Bitmaps.Feature.kAudible) + asserts.assert_true(feat_should_be_there, True) + self.print_step("Boolean State Config Audio Feature available ", feat_should_be_there) + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py b/src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py index 3b3fb6270b613c..0ad55369e106cb 100644 --- a/src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py +++ b/src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py @@ -1124,6 +1124,12 @@ def setup_class(self): self.current_step_index = 0 self.step_start_time = datetime.now(timezone.utc) self.step_skipped = False + self.global_wildcard = asyncio.wait_for(self.default_controller.Read(self.dut_node_id, [(Clusters.Descriptor), Attribute.AttributePath(None, None, GlobalAttributeIds.ATTRIBUTE_LIST_ID), Attribute.AttributePath( + None, None, GlobalAttributeIds.FEATURE_MAP_ID), Attribute.AttributePath(None, None, GlobalAttributeIds.ACCEPTED_COMMAND_LIST_ID)]), timeout=60) + # self.stored_global_wildcard stores value of self.global_wildcard after first async call. + # Because setup_class can be called before commissioning, this variable is lazy-initialized + # where the read is deferred until the first guard function call that requires global attributes. + self.stored_global_wildcard = None def setup_test(self): self.current_step_index = 0 @@ -1455,6 +1461,66 @@ def pics_guard(self, pics_condition: bool): self.mark_current_step_skipped() return pics_condition + async def attribute_guard(self, endpoint: int, attribute: ClusterObjects.ClusterAttributeDescriptor): + """Similar to pics_guard above, except checks a condition and if False marks the test step as skipped and + returns False using attributes against attributes_list, otherwise returns True. + For example can be used to check if a test step should be run: + + self.step("1") + if self.attribute_guard(condition1_needs_to_be_true_to_execute): + # do the test for step 1 + + self.step("2") + if self.attribute_guard(condition2_needs_to_be_false_to_skip_step): + # skip step 2 if condition not met + """ + if self.stored_global_wildcard is None: + self.stored_global_wildcard = await self.global_wildcard + attr_condition = _has_attribute(wildcard=self.stored_global_wildcard, endpoint=endpoint, attribute=attribute) + if not attr_condition: + self.mark_current_step_skipped() + return attr_condition + + async def command_guard(self, endpoint: int, command: ClusterObjects.ClusterCommand): + """Similar to attribute_guard above, except checks a condition and if False marks the test step as skipped and + returns False using command id against AcceptedCmdsList, otherwise returns True. + For example can be used to check if a test step should be run: + + self.step("1") + if self.command_guard(condition1_needs_to_be_true_to_execute): + # do the test for step 1 + + self.step("2") + if self.command_guard(condition2_needs_to_be_false_to_skip_step): + # skip step 2 if condition not met + """ + if self.stored_global_wildcard is None: + self.stored_global_wildcard = await self.global_wildcard + cmd_condition = _has_command(wildcard=self.stored_global_wildcard, endpoint=endpoint, command=command) + if not cmd_condition: + self.mark_current_step_skipped() + return cmd_condition + + async def feature_guard(self, endpoint: int, cluster: ClusterObjects.ClusterObjectDescriptor, feature_int: IntFlag): + """Similar to command_guard and attribute_guard above, except checks a condition and if False marks the test step as skipped and + returns False using feature id against feature_map, otherwise returns True. + For example can be used to check if a test step should be run: + + self.step("1") + if self.feature_guard(condition1_needs_to_be_true_to_execute): + # do the test for step 1 + + self.step("2") + if self.feature_guard(condition2_needs_to_be_false_to_skip_step): + # skip step 2 if condition not met + """ + if self.stored_global_wildcard is None: + self.stored_global_wildcard = await self.global_wildcard + feat_condition = _has_feature(wildcard=self.stored_global_wildcard, endpoint=endpoint, cluster=cluster, feature=feature_int) + if not feat_condition: + self.mark_current_step_skipped() + return feat_condition + def mark_current_step_skipped(self): try: steps = self.get_test_steps(self.current_test_info.name) @@ -2105,6 +2171,41 @@ def has_attribute(attribute: ClusterObjects.ClusterAttributeDescriptor) -> Endpo return partial(_has_attribute, attribute=attribute) +def _has_command(wildcard, endpoint, command: ClusterObjects.ClusterCommand) -> bool: + cluster = get_cluster_from_command(command) + try: + cmd_list = wildcard.attributes[endpoint][cluster][cluster.Attributes.AcceptedCommandList] + if not isinstance(cmd_list, list): + asserts.fail( + f"Failed to read mandatory AcceptedCommandList command value for cluster {cluster} on endpoint {endpoint}: {cmd_list}.") + return command.command_id in cmd_list + except KeyError: + return False + + +def has_command(command: ClusterObjects.ClusterCommand) -> EndpointCheckFunction: + """ EndpointCheckFunction that can be passed as a parameter to the run_if_endpoint_matches decorator. + + Use this function with the run_if_endpoint_matches decorator to run this test on all endpoints with + the specified attribute. For example, given a device with the following conformance + + EP0: cluster A, B, C + EP1: cluster D with command d, E + EP2, cluster D with command d + EP3, cluster D without command d + + And the following test specification: + @run_if_endpoint_matches(has_command(Clusters.D.Commands.d)) + test_mytest(self): + ... + + If you run this test with --endpoint 1 or --endpoint 2, the test will be run. If you run this test + with any other --endpoint the run_if_endpoint_matches decorator will call the on_skip function to + notify the test harness that the test is not applicable to this node and the test will not be run. + """ + return partial(_has_command, command=command) + + def _has_feature(wildcard, endpoint: int, cluster: ClusterObjects.ClusterObjectDescriptor, feature: IntFlag) -> bool: try: feature_map = wildcard.attributes[endpoint][cluster][cluster.Attributes.FeatureMap] diff --git a/src/python_testing/test_metadata.yaml b/src/python_testing/test_metadata.yaml index a6f0ba5bf6174e..dcabdeffdadb1d 100644 --- a/src/python_testing/test_metadata.yaml +++ b/src/python_testing/test_metadata.yaml @@ -97,6 +97,7 @@ slow_tests: - { name: TC_PS_2_3.py, duration: 30 seconds } - { name: TC_RR_1_1.py, duration: 25 seconds } - { name: TC_SWTCH.py, duration: 1 minute } + - { name: TC_TestAttrAvail.py, duration: 30 seconds } - { name: TC_TIMESYNC_2_10.py, duration: 20 seconds } - { name: TC_TIMESYNC_2_11.py, duration: 30 seconds } - { name: TC_TIMESYNC_2_12.py, duration: 20 seconds } From e3277eb02ed8115de5887e8beca0e35007ba71f3 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Mon, 16 Dec 2024 14:30:05 -0800 Subject: [PATCH 56/72] Enforce a maximum entry limit during append operations (#36843) * Enforce a maximum entry limit during append operations * Add test for this change --- .../user-label-server/user-label-server.cpp | 1 + .../TestUserLabelClusterConstraints.yaml | 32 +++++++++++++++++++ src/platform/DeviceInfoProvider.cpp | 11 +++++-- 3 files changed, 41 insertions(+), 3 deletions(-) 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 e1ea85cf01a78a..0030f628097696 100644 --- a/src/app/clusters/user-label-server/user-label-server.cpp +++ b/src/app/clusters/user-label-server/user-label-server.cpp @@ -143,6 +143,7 @@ CHIP_ERROR UserLabelAttrAccess::WriteLabelList(const ConcreteDataAttributePath & return provider->SetUserLabelList(endpoint, labelList); } + if (aPath.mListOp == ConcreteDataAttributePath::ListOperation::AppendItem) { Structs::LabelStruct::DecodableType entry; diff --git a/src/app/tests/suites/TestUserLabelClusterConstraints.yaml b/src/app/tests/suites/TestUserLabelClusterConstraints.yaml index 4074def78d82d1..935fe88c2b662c 100644 --- a/src/app/tests/suites/TestUserLabelClusterConstraints.yaml +++ b/src/app/tests/suites/TestUserLabelClusterConstraints.yaml @@ -55,3 +55,35 @@ tests: ] response: error: CONSTRAINT_ERROR + + - label: "Attempt to write a large label list" + command: "writeAttribute" + attribute: "LabelList" + arguments: + value: [ + # Example repeated user labels to blow up the maximum allowed + { Label: "roomName", Value: "master bedroom 1" }, + { Label: "orientation", Value: "east" }, + { Label: "floor", Value: "2" }, + { Label: "roomType", Value: "bedroom" }, + { Label: "someKey5", Value: "someVal5" }, + { Label: "someKey6", Value: "someVal6" }, + { Label: "someKey7", Value: "someVal7" }, + { Label: "someKey8", Value: "someVal8" }, + { Label: "someKey9", Value: "someVal9" }, + { Label: "someKey10", Value: "someVal10" }, + { Label: "someKey11", Value: "someVal11" }, + { Label: "someKey12", Value: "someVal12" }, + { Label: "someKey13", Value: "someVal13" }, + { Label: "someKey14", Value: "someVal14" }, + { Label: "someKey15", Value: "someVal15" }, + { Label: "someKey16", Value: "someVal16" }, + { Label: "someKey17", Value: "someVal17" }, + { Label: "someKey18", Value: "someVal18" }, + { Label: "someKey19", Value: "someVal19" }, + { Label: "someKey20", Value: "someVal20" }, + ] + response: + # When the cluster runs out of capacity to store these entries, + # we expect a FAILURE get returned. + error: FAILURE diff --git a/src/platform/DeviceInfoProvider.cpp b/src/platform/DeviceInfoProvider.cpp index 92ad84d86d49b8..28191cd4f82352 100644 --- a/src/platform/DeviceInfoProvider.cpp +++ b/src/platform/DeviceInfoProvider.cpp @@ -82,11 +82,16 @@ CHIP_ERROR DeviceInfoProvider::AppendUserLabel(EndpointId endpoint, const UserLa { size_t length; - // Increase the size of UserLabelList by 1 + // Fetch current list length ReturnErrorOnFailure(GetUserLabelLength(endpoint, length)); - ReturnErrorOnFailure(SetUserLabelLength(endpoint, length + 1)); - // Append the user label at the end of UserLabelList + if (length >= kMaxUserLabelListLength) + { + return CHIP_ERROR_NO_MEMORY; + } + + // Add the new entry to the list + ReturnErrorOnFailure(SetUserLabelLength(endpoint, length + 1)); ReturnErrorOnFailure(SetUserLabelAt(endpoint, length, label)); return CHIP_NO_ERROR; From 4e445861ce93eec07f0c93a02f309eb34ae7489f Mon Sep 17 00:00:00 2001 From: James Swan <122404367+swan-amazon@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:50:41 -0800 Subject: [PATCH 57/72] Feature/enhanced setup flow feature (#34065) * Add initial feature logic for Terms and Conditions (TC) acknowledgements This commit introduces the initial logic for handling Terms and Conditions (TC) acknowledgements in the General Commissioning cluster. The logic includes support for setting and checking TC acknowledgements and versions during the commissioning process. Changes include: - Handling TC acknowledgements and TC acknowledgement version in the pairing command. - Logic to read TC attributes and check TC acceptance in the General Commissioning server. - Introduction of classes to manage TC acceptance logic. - Initialization and use of TC providers in the server setup. - Addition of a new commissioning stage for TC acknowledgements in the commissioning flow. The feature logic is currently disabled and will be enabled in an example in a subsequent commit. * ./scripts/helpers/restyle-diff.sh @{u} * Ignore file reference check on TermsAndConditionsManager.cpp The TermsAndConditionsManager.cpp file is only referenced within sample apps that utilize the Terms and Conditions feature. * Make `terms and conditions required` build configurable: - Moved the configuration from core into app buildconfig - renamed the flag to expand `TC` into `TERMS AND CONDITIONS` - updated includes in general-commissioning to include the right header - added the configuration as a build option into targets.py/host.py - updated unit test * Move terms and conditions to its own target and include cpp file - Create a separate source set for terms and conditions - include the manager cpp in that file - make the build conditional (this required flag moving) - fixed typo in targets.py to make things compile Compile-tested only (the -terms-and-conditions variant of all clusters compiled) * Fix mangled license blurb * Remove edited date for CHIPConfig.h * Fix unit tests dependencies * Add back some includes --------- Co-authored-by: Andrei Litvin --- scripts/build/build/targets.py | 1 + scripts/build/builders/host.py | 7 + .../build/testdata/all_targets_linux_x64.txt | 2 +- src/app/BUILD.gn | 1 + src/app/FailSafeContext.cpp | 9 +- src/app/FailSafeContext.h | 18 +- src/app/chip_data_model.cmake | 3 +- .../general-commissioning-server.cpp | 374 +++++++++++++-- src/app/common_flags.gni | 4 + src/app/server/BUILD.gn | 22 +- .../DefaultTermsAndConditionsProvider.cpp | 251 ++++++++++ .../DefaultTermsAndConditionsProvider.h | 152 ++++++ src/app/server/TermsAndConditionsManager.cpp | 80 ++++ src/app/server/TermsAndConditionsManager.h | 45 ++ src/app/server/TermsAndConditionsProvider.h | 224 +++++++++ src/app/tests/BUILD.gn | 5 +- .../TestDefaultTermsAndConditionsProvider.cpp | 435 ++++++++++++++++++ src/include/platform/CHIPDeviceEvent.h | 1 + src/lib/support/DefaultStorageKeyAllocator.h | 6 +- 19 files changed, 1587 insertions(+), 53 deletions(-) create mode 100644 src/app/server/DefaultTermsAndConditionsProvider.cpp create mode 100644 src/app/server/DefaultTermsAndConditionsProvider.h create mode 100644 src/app/server/TermsAndConditionsManager.cpp create mode 100644 src/app/server/TermsAndConditionsManager.h create mode 100644 src/app/server/TermsAndConditionsProvider.h create mode 100644 src/app/tests/TestDefaultTermsAndConditionsProvider.cpp diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 0bb25ef9a06b75..d7935e95ffeaaf 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -197,6 +197,7 @@ def BuildHostTarget(): target.AppendModifier('disable-dnssd-tests', enable_dnssd_tests=False).OnlyIfRe('-tests') target.AppendModifier('chip-casting-simplified', chip_casting_simplified=True).OnlyIfRe('-tv-casting-app') target.AppendModifier('googletest', use_googletest=True).OnlyIfRe('-tests') + target.AppendModifier('terms-and-conditions', terms_and_conditions_required=True) return target diff --git a/scripts/build/builders/host.py b/scripts/build/builders/host.py index 7fe5823f37b7a8..fd84901a5adaba 100644 --- a/scripts/build/builders/host.py +++ b/scripts/build/builders/host.py @@ -336,6 +336,7 @@ def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE, chip_casting_simplified: Optional[bool] = None, disable_shell=False, use_googletest=False, + terms_and_conditions_required: Optional[bool] = None, ): super(HostBuilder, self).__init__( root=os.path.join(root, 'examples', app.ExamplePath()), @@ -459,6 +460,12 @@ def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE, if chip_casting_simplified is not None: self.extra_gn_options.append(f'chip_casting_simplified={str(chip_casting_simplified).lower()}') + if terms_and_conditions_required is not None: + if terms_and_conditions_required: + self.extra_gn_options.append('chip_terms_and_conditions_required=true') + else: + self.extra_gn_options.append('chip_terms_and_conditions_required=false') + if self.board == HostBoard.ARM64: if not use_clang: raise Exception("Cross compile only supported using clang") diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index f3330ffc3fe090..05fec168c491c6 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -9,7 +9,7 @@ efr32-{brd2704b,brd4316a,brd4317a,brd4318a,brd4319a,brd4186a,brd4187a,brd2601b,b 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] 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,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][-googletest] +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][-googletest][-terms-and-conditions] 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] diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 14fcfc96e45543..fd286ff7c9c2d4 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -76,6 +76,7 @@ buildconfig_header("app_buildconfig") { "CHIP_DEVICE_CONFIG_DYNAMIC_SERVER=${chip_build_controller_dynamic_server}", "CHIP_CONFIG_ENABLE_BUSY_HANDLING_FOR_OPERATIONAL_SESSION_SETUP=${chip_enable_busy_handling_for_operational_session_setup}", "CHIP_CONFIG_DATA_MODEL_EXTRA_LOGGING=${chip_data_model_extra_logging}", + "CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED=${chip_terms_and_conditions_required}", ] visibility = [ ":app_config" ] diff --git a/src/app/FailSafeContext.cpp b/src/app/FailSafeContext.cpp index 95a5b267f2aa5e..372ee323930d67 100644 --- a/src/app/FailSafeContext.cpp +++ b/src/app/FailSafeContext.cpp @@ -86,9 +86,12 @@ void FailSafeContext::ScheduleFailSafeCleanup(FabricIndex fabricIndex, bool addN SetFailSafeArmed(false); ChipDeviceEvent event{ .Type = DeviceEventType::kFailSafeTimerExpired, - .FailSafeTimerExpired = { .fabricIndex = fabricIndex, - .addNocCommandHasBeenInvoked = addNocCommandInvoked, - .updateNocCommandHasBeenInvoked = updateNocCommandInvoked } }; + .FailSafeTimerExpired = { + .fabricIndex = fabricIndex, + .addNocCommandHasBeenInvoked = addNocCommandInvoked, + .updateNocCommandHasBeenInvoked = updateNocCommandInvoked, + .updateTermsAndConditionsHasBeenInvoked = mUpdateTermsAndConditionsHasBeenInvoked, + } }; CHIP_ERROR status = PlatformMgr().PostEvent(&event); if (status != CHIP_NO_ERROR) diff --git a/src/app/FailSafeContext.h b/src/app/FailSafeContext.h index 48e11e0845395b..af177bd2a8d5fc 100644 --- a/src/app/FailSafeContext.h +++ b/src/app/FailSafeContext.h @@ -56,6 +56,7 @@ class FailSafeContext void SetUpdateNocCommandInvoked() { mUpdateNocCommandHasBeenInvoked = true; } void SetAddTrustedRootCertInvoked() { mAddTrustedRootCertHasBeenInvoked = true; } void SetCsrRequestForUpdateNoc(bool isForUpdateNoc) { mIsCsrRequestForUpdateNoc = isForUpdateNoc; } + void SetUpdateTermsAndConditionsHasBeenInvoked() { mUpdateTermsAndConditionsHasBeenInvoked = true; } /** * @brief @@ -91,6 +92,7 @@ class FailSafeContext bool UpdateNocCommandHasBeenInvoked() const { return mUpdateNocCommandHasBeenInvoked; } bool AddTrustedRootCertHasBeenInvoked() const { return mAddTrustedRootCertHasBeenInvoked; } bool IsCsrRequestForUpdateNoc() const { return mIsCsrRequestForUpdateNoc; } + bool UpdateTermsAndConditionsHasBeenInvoked() { return mUpdateTermsAndConditionsHasBeenInvoked; } FabricIndex GetFabricIndex() const { @@ -109,8 +111,9 @@ class FailSafeContext bool mUpdateNocCommandHasBeenInvoked = false; bool mAddTrustedRootCertHasBeenInvoked = false; // The fact of whether a CSR occurred at all is stored elsewhere. - bool mIsCsrRequestForUpdateNoc = false; - FabricIndex mFabricIndex = kUndefinedFabricIndex; + bool mIsCsrRequestForUpdateNoc = false; + FabricIndex mFabricIndex = kUndefinedFabricIndex; + bool mUpdateTermsAndConditionsHasBeenInvoked = false; /** * @brief @@ -140,11 +143,12 @@ class FailSafeContext { SetFailSafeArmed(false); - mAddNocCommandHasBeenInvoked = false; - mUpdateNocCommandHasBeenInvoked = false; - mAddTrustedRootCertHasBeenInvoked = false; - mFailSafeBusy = false; - mIsCsrRequestForUpdateNoc = false; + mAddNocCommandHasBeenInvoked = false; + mUpdateNocCommandHasBeenInvoked = false; + mAddTrustedRootCertHasBeenInvoked = false; + mFailSafeBusy = false; + mIsCsrRequestForUpdateNoc = false; + mUpdateTermsAndConditionsHasBeenInvoked = false; } void FailSafeTimerExpired(); diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake index 7c5ab0f82608b4..dcafc0055de3e9 100644 --- a/src/app/chip_data_model.cmake +++ b/src/app/chip_data_model.cmake @@ -81,8 +81,9 @@ function(chip_configure_data_model APP_TARGET) ${CHIP_APP_BASE_DIR}/SafeAttributePersistenceProvider.cpp ${CHIP_APP_BASE_DIR}/StorageDelegateWrapper.cpp ${CHIP_APP_BASE_DIR}/server/AclStorage.cpp - ${CHIP_APP_BASE_DIR}/server/DefaultAclStorage.cpp ${CHIP_APP_BASE_DIR}/server/CommissioningWindowManager.cpp + ${CHIP_APP_BASE_DIR}/server/DefaultAclStorage.cpp + ${CHIP_APP_BASE_DIR}/server/DefaultTermsAndConditionsProvider.cpp ${CHIP_APP_BASE_DIR}/server/Dnssd.cpp ${CHIP_APP_BASE_DIR}/server/EchoHandler.cpp ${CHIP_APP_BASE_DIR}/server/OnboardingCodesUtil.cpp diff --git a/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp b/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp index 4bf97face53740..f6fad1d8908243 100644 --- a/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp +++ b/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp @@ -1,6 +1,6 @@ /** * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-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,20 +21,29 @@ ******************************************************************************* ******************************************************************************/ +#include "general-commissioning-server.h" + #include #include +#include #include #include #include +#include #include #include -#include -#include +#include #include #include #include #include #include +#include + +#if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED +#include //nogncheck +#include //nogncheck +#endif using namespace chip; using namespace chip::app; @@ -42,6 +51,7 @@ using namespace chip::app::Clusters; using namespace chip::app::Clusters::GeneralCommissioning; using namespace chip::app::Clusters::GeneralCommissioning::Attributes; using namespace chip::DeviceLayer; +using chip::app::Clusters::GeneralCommissioning::CommissioningErrorEnum; using Transport::SecureSession; using Transport::Session; @@ -95,6 +105,58 @@ CHIP_ERROR GeneralCommissioningAttrAccess::Read(const ConcreteReadAttributePath case SupportsConcurrentConnection::Id: { return ReadSupportsConcurrentConnection(aEncoder); } +#if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED + case TCAcceptedVersion::Id: { + TermsAndConditionsProvider * tcProvider = TermsAndConditionsManager::GetInstance(); + Optional outTermsAndConditions; + + VerifyOrReturnError(nullptr != tcProvider, CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); + ReturnErrorOnFailure(tcProvider->GetAcceptance(outTermsAndConditions)); + + return aEncoder.Encode(outTermsAndConditions.ValueOr(TermsAndConditions(0, 0)).GetVersion()); + } + case TCMinRequiredVersion::Id: { + TermsAndConditionsProvider * tcProvider = TermsAndConditionsManager::GetInstance(); + Optional outTermsAndConditions; + + VerifyOrReturnError(nullptr != tcProvider, CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); + ReturnErrorOnFailure(tcProvider->GetRequirements(outTermsAndConditions)); + + return aEncoder.Encode(outTermsAndConditions.ValueOr(TermsAndConditions(0, 0)).GetVersion()); + } + case TCAcknowledgements::Id: { + TermsAndConditionsProvider * tcProvider = TermsAndConditionsManager::GetInstance(); + Optional outTermsAndConditions; + + VerifyOrReturnError(nullptr != tcProvider, CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); + ReturnErrorOnFailure(tcProvider->GetAcceptance(outTermsAndConditions)); + + return aEncoder.Encode(outTermsAndConditions.ValueOr(TermsAndConditions(0, 0)).GetValue()); + } + case TCAcknowledgementsRequired::Id: { + TermsAndConditionsProvider * tcProvider = TermsAndConditionsManager::GetInstance(); + bool acknowledgementsRequired; + + VerifyOrReturnError(nullptr != tcProvider, CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); + ReturnErrorOnFailure(tcProvider->GetAcknowledgementsRequired(acknowledgementsRequired)); + + return aEncoder.Encode(acknowledgementsRequired); + } + case TCUpdateDeadline::Id: { + TermsAndConditionsProvider * tcProvider = TermsAndConditionsManager::GetInstance(); + Optional outUpdateAcceptanceDeadline; + + VerifyOrReturnError(nullptr != tcProvider, CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); + ReturnErrorOnFailure(tcProvider->GetUpdateAcceptanceDeadline(outUpdateAcceptanceDeadline)); + + if (!outUpdateAcceptanceDeadline.HasValue()) + { + return aEncoder.EncodeNull(); + } + + return aEncoder.Encode(outUpdateAcceptanceDeadline.Value()); + } +#endif // CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED default: { break; } @@ -144,6 +206,73 @@ CHIP_ERROR GeneralCommissioningAttrAccess::ReadSupportsConcurrentConnection(Attr return aEncoder.Encode(supportsConcurrentConnection); } +#if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED +typedef struct sTermsAndConditionsState +{ + Optional acceptance; + bool acknowledgementsRequired; + Optional requirements; + Optional updateAcceptanceDeadline; +} TermsAndConditionsState; + +CHIP_ERROR GetTermsAndConditionsAttributeState(TermsAndConditionsProvider * tcProvider, + TermsAndConditionsState & outTermsAndConditionsState) +{ + TermsAndConditionsState termsAndConditionsState; + + ReturnErrorOnFailure(tcProvider->GetAcceptance(termsAndConditionsState.acceptance)); + ReturnErrorOnFailure(tcProvider->GetAcknowledgementsRequired(termsAndConditionsState.acknowledgementsRequired)); + ReturnErrorOnFailure(tcProvider->GetRequirements(termsAndConditionsState.requirements)); + ReturnErrorOnFailure(tcProvider->GetUpdateAcceptanceDeadline(termsAndConditionsState.updateAcceptanceDeadline)); + + outTermsAndConditionsState = termsAndConditionsState; + return CHIP_NO_ERROR; +} + +void NotifyTermsAndConditionsAttributeChangeIfRequired(const TermsAndConditionsState & initialState, + const TermsAndConditionsState & updatedState) +{ + // Notify on TCAcknowledgementsRequired change + if (initialState.acknowledgementsRequired != updatedState.acknowledgementsRequired) + { + MatterReportingAttributeChangeCallback(kRootEndpointId, GeneralCommissioning::Id, TCAcknowledgementsRequired::Id); + } + + // Notify on TCAcceptedVersion change + if ((initialState.acceptance.HasValue() != updatedState.acceptance.HasValue()) || + (initialState.acceptance.HasValue() && + (initialState.acceptance.Value().GetVersion() != updatedState.acceptance.Value().GetVersion()))) + { + MatterReportingAttributeChangeCallback(kRootEndpointId, GeneralCommissioning::Id, TCAcceptedVersion::Id); + } + + // Notify on TCAcknowledgements change + if ((initialState.acceptance.HasValue() != updatedState.acceptance.HasValue()) || + (initialState.acceptance.HasValue() && + (initialState.acceptance.Value().GetValue() != updatedState.acceptance.Value().GetValue()))) + { + MatterReportingAttributeChangeCallback(kRootEndpointId, GeneralCommissioning::Id, TCAcknowledgements::Id); + } + + // Notify on TCRequirements change + if ((initialState.requirements.HasValue() != updatedState.requirements.HasValue()) || + (initialState.requirements.HasValue() && + (initialState.requirements.Value().GetVersion() != updatedState.requirements.Value().GetVersion() || + initialState.requirements.Value().GetValue() != updatedState.requirements.Value().GetValue()))) + { + MatterReportingAttributeChangeCallback(kRootEndpointId, GeneralCommissioning::Id, TCMinRequiredVersion::Id); + } + + // Notify on TCUpdateDeadline change + if ((initialState.updateAcceptanceDeadline.HasValue() != updatedState.updateAcceptanceDeadline.HasValue()) || + (initialState.updateAcceptanceDeadline.HasValue() && + (initialState.updateAcceptanceDeadline.Value() != updatedState.updateAcceptanceDeadline.Value()))) + { + MatterReportingAttributeChangeCallback(kRootEndpointId, GeneralCommissioning::Id, TCUpdateDeadline::Id); + } +} +#endif // CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED + } // anonymous namespace bool emberAfGeneralCommissioningClusterArmFailSafeCallback(app::CommandHandler * commandObj, @@ -218,60 +347,115 @@ bool emberAfGeneralCommissioningClusterCommissioningCompleteCallback( auto & failSafe = Server::GetInstance().GetFailSafeContext(); auto & fabricTable = Server::GetInstance().GetFabricTable(); + CHIP_ERROR err = CHIP_NO_ERROR; + ChipLogProgress(FailSafe, "GeneralCommissioning: Received CommissioningComplete"); Commands::CommissioningCompleteResponse::Type response; + + // Fail-safe must be armed if (!failSafe.IsFailSafeArmed()) { response.errorCode = CommissioningErrorEnum::kNoFailSafe; + commandObj->AddResponse(commandPath, response); + return true; } - else + +#if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED + TermsAndConditionsProvider * tcProvider = TermsAndConditionsManager::GetInstance(); + + // Ensure required terms and conditions have been accepted, then attempt to commit + if (nullptr != tcProvider) { - SessionHandle handle = commandObj->GetExchangeContext()->GetSessionHandle(); - // If not a CASE session, or the fabric does not match the fail-safe, - // error out. - if (handle->GetSessionType() != Session::SessionType::kSecure || - handle->AsSecureSession()->GetSecureSessionType() != SecureSession::Type::kCASE || - !failSafe.MatchesFabricIndex(commandObj->GetAccessingFabricIndex())) + Optional requiredTermsAndConditionsMaybe; + Optional acceptedTermsAndConditionsMaybe; + + CheckSuccess(tcProvider->GetRequirements(requiredTermsAndConditionsMaybe), Failure); + CheckSuccess(tcProvider->GetAcceptance(acceptedTermsAndConditionsMaybe), Failure); + + if (requiredTermsAndConditionsMaybe.HasValue() && !acceptedTermsAndConditionsMaybe.HasValue()) { - response.errorCode = CommissioningErrorEnum::kInvalidAuthentication; - ChipLogError(FailSafe, "GeneralCommissioning: Got commissioning complete in invalid security context"); + response.errorCode = CommissioningErrorEnum::kTCAcknowledgementsNotReceived; + commandObj->AddResponse(commandPath, response); + return true; } - else + + if (requiredTermsAndConditionsMaybe.HasValue() && acceptedTermsAndConditionsMaybe.HasValue()) { - if (failSafe.NocCommandHasBeenInvoked()) + TermsAndConditions requiredTermsAndConditions = requiredTermsAndConditionsMaybe.Value(); + TermsAndConditions acceptedTermsAndConditions = acceptedTermsAndConditionsMaybe.Value(); + + if (!requiredTermsAndConditions.ValidateVersion(acceptedTermsAndConditions)) { - CHIP_ERROR err = fabricTable.CommitPendingFabricData(); - if (err != CHIP_NO_ERROR) - { - // No need to revert on error: CommitPendingFabricData always reverts if not fully successful. - ChipLogError(FailSafe, "GeneralCommissioning: Failed to commit pending fabric data: %" CHIP_ERROR_FORMAT, - err.Format()); - } - else - { - ChipLogProgress(FailSafe, "GeneralCommissioning: Successfully commited pending fabric data"); - } - CheckSuccess(err, Failure); + response.errorCode = CommissioningErrorEnum::kTCMinVersionNotMet; + commandObj->AddResponse(commandPath, response); + return true; } - /* - * Pass fabric of commissioner to DeviceControlSvr. - * This allows device to send messages back to commissioner. - * Once bindings are implemented, this may no longer be needed. - */ - failSafe.DisarmFailSafe(); - CheckSuccess( - devCtrl->PostCommissioningCompleteEvent(handle->AsSecureSession()->GetPeerNodeId(), handle->GetFabricIndex()), - Failure); + if (!requiredTermsAndConditions.ValidateValue(acceptedTermsAndConditions)) + { + response.errorCode = CommissioningErrorEnum::kRequiredTCNotAccepted; + commandObj->AddResponse(commandPath, response); + return true; + } + } - Breadcrumb::Set(commandPath.mEndpointId, 0); - response.errorCode = CommissioningErrorEnum::kOk; + if (failSafe.UpdateTermsAndConditionsHasBeenInvoked()) + { + // Commit terms and conditions acceptance on commissioning complete + err = tcProvider->CommitAcceptance(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(FailSafe, "GeneralCommissioning: Failed to commit terms and conditions: %" CHIP_ERROR_FORMAT, + err.Format()); + } + else + { + ChipLogProgress(FailSafe, "GeneralCommissioning: Successfully committed terms and conditions"); + } + CheckSuccess(err, Failure); } } +#endif // CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED - commandObj->AddResponse(commandPath, response); + SessionHandle handle = commandObj->GetExchangeContext()->GetSessionHandle(); + + // Ensure it's a valid CASE session + if ((handle->GetSessionType() != Session::SessionType::kSecure) || + (handle->AsSecureSession()->GetSecureSessionType() != SecureSession::Type::kCASE) || + (!failSafe.MatchesFabricIndex(commandObj->GetAccessingFabricIndex()))) + { + response.errorCode = CommissioningErrorEnum::kInvalidAuthentication; + ChipLogError(FailSafe, "GeneralCommissioning: Got commissioning complete in invalid security context"); + commandObj->AddResponse(commandPath, response); + return true; + } + + // Handle NOC commands + if (failSafe.NocCommandHasBeenInvoked()) + { + err = fabricTable.CommitPendingFabricData(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(FailSafe, "GeneralCommissioning: Failed to commit pending fabric data: %" CHIP_ERROR_FORMAT, err.Format()); + // CommitPendingFabricData reverts on error, no need to revert explicitly + } + else + { + ChipLogProgress(FailSafe, "GeneralCommissioning: Successfully committed pending fabric data"); + } + CheckSuccess(err, Failure); + } + + // Disarm the fail-safe and notify the DeviceControlServer + failSafe.DisarmFailSafe(); + err = devCtrl->PostCommissioningCompleteEvent(handle->AsSecureSession()->GetPeerNodeId(), handle->GetFabricIndex()); + CheckSuccess(err, Failure); + Breadcrumb::Set(commandPath.mEndpointId, 0); + response.errorCode = CommissioningErrorEnum::kOk; + + commandObj->AddResponse(commandPath, response); return true; } @@ -328,6 +512,77 @@ bool emberAfGeneralCommissioningClusterSetRegulatoryConfigCallback(app::CommandH return true; } +bool emberAfGeneralCommissioningClusterSetTCAcknowledgementsCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const GeneralCommissioning::Commands::SetTCAcknowledgements::DecodableType & commandData) +{ + MATTER_TRACE_SCOPE("SetTCAcknowledgements", "GeneralCommissioning"); + +#if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED + auto & failSafeContext = Server::GetInstance().GetFailSafeContext(); + TermsAndConditionsProvider * tcProvider = TermsAndConditionsManager::GetInstance(); + + if (nullptr == tcProvider) + { + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::Failure); + return true; + } + + Optional requiredTermsAndConditionsMaybe; + Optional previousAcceptedTermsAndConditionsMaybe; + CheckSuccess(tcProvider->GetRequirements(requiredTermsAndConditionsMaybe), Failure); + CheckSuccess(tcProvider->GetAcceptance(previousAcceptedTermsAndConditionsMaybe), Failure); + TermsAndConditions acceptedTermsAndConditions = TermsAndConditions(commandData.TCUserResponse, commandData.TCVersion); + Optional acceptedTermsAndConditionsPresent = Optional(acceptedTermsAndConditions); + + Commands::SetTCAcknowledgementsResponse::Type response; + + if (requiredTermsAndConditionsMaybe.HasValue()) + { + TermsAndConditions requiredTermsAndConditions = requiredTermsAndConditionsMaybe.Value(); + + if (!requiredTermsAndConditions.ValidateVersion(acceptedTermsAndConditions)) + { + response.errorCode = CommissioningErrorEnum::kTCMinVersionNotMet; + commandObj->AddResponse(commandPath, response); + return true; + } + + if (!requiredTermsAndConditions.ValidateValue(acceptedTermsAndConditions)) + { + response.errorCode = CommissioningErrorEnum::kRequiredTCNotAccepted; + commandObj->AddResponse(commandPath, response); + return true; + } + } + + if (previousAcceptedTermsAndConditionsMaybe != acceptedTermsAndConditionsPresent) + { + TermsAndConditionsState initialState, updatedState; + CheckSuccess(GetTermsAndConditionsAttributeState(tcProvider, initialState), Failure); + CheckSuccess(tcProvider->SetAcceptance(acceptedTermsAndConditionsPresent), Failure); + CheckSuccess(GetTermsAndConditionsAttributeState(tcProvider, updatedState), Failure); + NotifyTermsAndConditionsAttributeChangeIfRequired(initialState, updatedState); + + // Commit or defer based on fail-safe state + if (!failSafeContext.IsFailSafeArmed()) + { + CheckSuccess(tcProvider->CommitAcceptance(), Failure); + } + else + { + failSafeContext.SetUpdateTermsAndConditionsHasBeenInvoked(); + } + } + + response.errorCode = CommissioningErrorEnum::kOk; + commandObj->AddResponse(commandPath, response); + return true; + +#endif // CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED + return true; +} + namespace { void OnPlatformEventHandler(const DeviceLayer::ChipDeviceEvent * event, intptr_t arg) { @@ -335,16 +590,59 @@ void OnPlatformEventHandler(const DeviceLayer::ChipDeviceEvent * event, intptr_t { // Spec says to reset Breadcrumb attribute to 0. Breadcrumb::Set(0, 0); + + if (event->FailSafeTimerExpired.updateTermsAndConditionsHasBeenInvoked) + { +#if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED + // Clear terms and conditions acceptance on failsafe timer expiration + TermsAndConditionsProvider * tcProvider = TermsAndConditionsManager::GetInstance(); + TermsAndConditionsState initialState, updatedState; + VerifyOrReturn(nullptr != tcProvider); + VerifyOrReturn(CHIP_NO_ERROR == GetTermsAndConditionsAttributeState(tcProvider, initialState)); + VerifyOrReturn(CHIP_NO_ERROR == tcProvider->RevertAcceptance()); + VerifyOrReturn(CHIP_NO_ERROR == GetTermsAndConditionsAttributeState(tcProvider, updatedState)); + NotifyTermsAndConditionsAttributeChangeIfRequired(initialState, updatedState); +#endif // CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED + } } } } // anonymous namespace +class GeneralCommissioningFabricTableDelegate : public chip::FabricTable::Delegate +{ +public: + // Gets called when a fabric is deleted + void OnFabricRemoved(const FabricTable & fabricTable, FabricIndex fabricIndex) override + { + // If the FabricIndex matches the last remaining entry in the Fabrics list, then the device SHALL delete all Matter + // related data on the node which was created since it was commissioned. + if (Server::GetInstance().GetFabricTable().FabricCount() == 0) + { + ChipLogProgress(Zcl, "general-commissioning-server: Last Fabric index 0x%x was removed", + static_cast(fabricIndex)); + +#if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED + TermsAndConditionsProvider * tcProvider = TermsAndConditionsManager::GetInstance(); + TermsAndConditionsState initialState, updatedState; + VerifyOrReturn(nullptr != tcProvider); + VerifyOrReturn(CHIP_NO_ERROR == GetTermsAndConditionsAttributeState(tcProvider, initialState)); + VerifyOrReturn(CHIP_NO_ERROR == tcProvider->ResetAcceptance()); + VerifyOrReturn(CHIP_NO_ERROR == GetTermsAndConditionsAttributeState(tcProvider, updatedState)); + NotifyTermsAndConditionsAttributeChangeIfRequired(initialState, updatedState); +#endif // CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED + } + } +}; + void MatterGeneralCommissioningPluginServerInitCallback() { Breadcrumb::Set(0, 0); AttributeAccessInterfaceRegistry::Instance().Register(&gAttrAccess); DeviceLayer::PlatformMgrImpl().AddEventHandler(OnPlatformEventHandler); + + static GeneralCommissioningFabricTableDelegate generalCommissioningFabricTableDelegate; + Server::GetInstance().GetFabricTable().AddFabricDelegate(&generalCommissioningFabricTableDelegate); } namespace chip { diff --git a/src/app/common_flags.gni b/src/app/common_flags.gni index 30678dfe330f2f..7fd111c371b548 100644 --- a/src/app/common_flags.gni +++ b/src/app/common_flags.gni @@ -25,6 +25,10 @@ declare_args() { # communicated to OperationalSessionSetup API consumers. chip_enable_busy_handling_for_operational_session_setup = true + # Controls whether the device commissioning process requires the user to + # acknowledge terms and conditions during commissioning. + chip_terms_and_conditions_required = false + # This controls if more logging is supposed to be enabled into the data models. # This is an optimization for small-flash size devices as extra logging requires # additional flash for messages & code for formatting. diff --git a/src/app/server/BUILD.gn b/src/app/server/BUILD.gn index fb25ae0f38bf6b..040c7b2227ff2a 100644 --- a/src/app/server/BUILD.gn +++ b/src/app/server/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Project CHIP Authors +# Copyright (c) 2020-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. @@ -25,6 +25,22 @@ config("server_config") { } } +source_set("terms_and_conditions") { + sources = [ + "DefaultTermsAndConditionsProvider.cpp", + "DefaultTermsAndConditionsProvider.h", + "TermsAndConditionsManager.cpp", + "TermsAndConditionsManager.h", + "TermsAndConditionsProvider.h", + ] + + public_deps = [ + "${chip_root}/src/lib/core", + "${chip_root}/src/lib/support", + "${chip_root}/src/protocols", + ] +} + static_library("server") { output_name = "libCHIPAppServer" @@ -69,6 +85,10 @@ static_library("server") { "${chip_root}/src/transport", ] + if (chip_terms_and_conditions_required) { + public_deps += [ ":terms_and_conditions" ] + } + # TODO: Server.cpp uses TestGroupData.h. Unsure why test code would be in such a central place # This dependency is split since it should probably be removed (or naming should # be updated if this is not really "testing" even though headers are Test*.h) diff --git a/src/app/server/DefaultTermsAndConditionsProvider.cpp b/src/app/server/DefaultTermsAndConditionsProvider.cpp new file mode 100644 index 00000000000000..36431aea456128 --- /dev/null +++ b/src/app/server/DefaultTermsAndConditionsProvider.cpp @@ -0,0 +1,251 @@ +/* + * 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 "DefaultTermsAndConditionsProvider.h" +#include "TermsAndConditionsProvider.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace { +constexpr chip::TLV::Tag kSerializationVersionTag = chip::TLV::ContextTag(1); +constexpr chip::TLV::Tag kAcceptedAcknowledgementsTag = chip::TLV::ContextTag(2); +constexpr chip::TLV::Tag kAcceptedAcknowledgementsVersionTag = chip::TLV::ContextTag(3); +constexpr uint8_t kSerializationSchemaMinimumVersion = 1; +constexpr uint8_t kSerializationSchemaCurrentVersion = 1; + +constexpr size_t kEstimatedTlvBufferSize = chip::TLV::EstimateStructOverhead(sizeof(uint8_t), // SerializationVersion + sizeof(uint16_t), // AcceptedAcknowledgements + sizeof(uint16_t) // AcceptedAcknowledgementsVersion + ) * + 4; // Extra space for rollback compatibility +} // namespace + +CHIP_ERROR chip::app::DefaultTermsAndConditionsStorageDelegate::Init(PersistentStorageDelegate * inPersistentStorageDelegate) +{ + VerifyOrReturnValue(nullptr != inPersistentStorageDelegate, CHIP_ERROR_INVALID_ARGUMENT); + + mStorageDelegate = inPersistentStorageDelegate; + + return CHIP_NO_ERROR; +} + +CHIP_ERROR chip::app::DefaultTermsAndConditionsStorageDelegate::Delete() +{ + VerifyOrReturnValue(nullptr != mStorageDelegate, CHIP_ERROR_UNINITIALIZED); + + const chip::StorageKeyName kStorageKey = chip::DefaultStorageKeyAllocator::TermsAndConditionsAcceptance(); + ReturnErrorOnFailure(mStorageDelegate->SyncDeleteKeyValue(kStorageKey.KeyName())); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR chip::app::DefaultTermsAndConditionsStorageDelegate::Get(Optional & outTermsAndConditions) +{ + VerifyOrReturnValue(nullptr != mStorageDelegate, CHIP_ERROR_UNINITIALIZED); + + uint8_t serializationVersion = 0; + uint16_t acknowledgements = 0; + uint16_t acknowledgementsVersion = 0; + + chip::TLV::TLVReader tlvReader; + chip::TLV::TLVType tlvContainer; + + uint8_t buffer[kEstimatedTlvBufferSize] = { 0 }; + uint16_t bufferSize = sizeof(buffer); + + const chip::StorageKeyName kStorageKey = chip::DefaultStorageKeyAllocator::TermsAndConditionsAcceptance(); + + CHIP_ERROR err = mStorageDelegate->SyncGetKeyValue(kStorageKey.KeyName(), &buffer, bufferSize); + VerifyOrReturnValue(CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND == err || CHIP_NO_ERROR == err, err); + + if (CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND == err) + { + outTermsAndConditions.ClearValue(); + return CHIP_NO_ERROR; + } + + tlvReader.Init(buffer, bufferSize); + ReturnErrorOnFailure(tlvReader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag())); + ReturnErrorOnFailure(tlvReader.EnterContainer(tlvContainer)); + ReturnErrorOnFailure(tlvReader.Next(kSerializationVersionTag)); + ReturnErrorOnFailure(tlvReader.Get(serializationVersion)); + + if (serializationVersion < kSerializationSchemaMinimumVersion) + { + ChipLogError(AppServer, "The terms and conditions datastore schema (%hhu) is newer than oldest compatible schema (%hhu)", + serializationVersion, kSerializationSchemaMinimumVersion); + return CHIP_IM_GLOBAL_STATUS(ConstraintError); + } + + if (serializationVersion != kSerializationSchemaCurrentVersion) + { + ChipLogDetail(AppServer, "The terms and conditions datastore schema (%hhu) differs from current schema (%hhu)", + serializationVersion, kSerializationSchemaCurrentVersion); + } + + ReturnErrorOnFailure(tlvReader.Next(kAcceptedAcknowledgementsTag)); + ReturnErrorOnFailure(tlvReader.Get(acknowledgements)); + ReturnErrorOnFailure(tlvReader.Next(kAcceptedAcknowledgementsVersionTag)); + ReturnErrorOnFailure(tlvReader.Get(acknowledgementsVersion)); + ReturnErrorOnFailure(tlvReader.ExitContainer(tlvContainer)); + + outTermsAndConditions = Optional(TermsAndConditions(acknowledgements, acknowledgementsVersion)); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR chip::app::DefaultTermsAndConditionsStorageDelegate::Set(const TermsAndConditions & inTermsAndConditions) +{ + uint8_t buffer[kEstimatedTlvBufferSize] = { 0 }; + chip::TLV::TLVWriter tlvWriter; + chip::TLV::TLVType tlvContainer; + + VerifyOrReturnValue(nullptr != mStorageDelegate, CHIP_ERROR_UNINITIALIZED); + + tlvWriter.Init(buffer); + ReturnErrorOnFailure(tlvWriter.StartContainer(chip::TLV::AnonymousTag(), chip::TLV::kTLVType_Structure, tlvContainer)); + ReturnErrorOnFailure(tlvWriter.Put(kSerializationVersionTag, kSerializationSchemaCurrentVersion)); + ReturnErrorOnFailure(tlvWriter.Put(kAcceptedAcknowledgementsTag, inTermsAndConditions.GetValue())); + ReturnErrorOnFailure(tlvWriter.Put(kAcceptedAcknowledgementsVersionTag, inTermsAndConditions.GetVersion())); + ReturnErrorOnFailure(tlvWriter.EndContainer(tlvContainer)); + ReturnErrorOnFailure(tlvWriter.Finalize()); + + const chip::StorageKeyName kStorageKey = chip::DefaultStorageKeyAllocator::TermsAndConditionsAcceptance(); + ReturnErrorOnFailure( + mStorageDelegate->SyncSetKeyValue(kStorageKey.KeyName(), buffer, static_cast(tlvWriter.GetLengthWritten()))); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR chip::app::DefaultTermsAndConditionsProvider::Init( + TermsAndConditionsStorageDelegate * inStorageDelegate, + const chip::Optional & inRequiredTermsAndConditions) +{ + VerifyOrReturnValue(nullptr != inStorageDelegate, CHIP_ERROR_INVALID_ARGUMENT); + + mTermsAndConditionsStorageDelegate = inStorageDelegate; + mRequiredAcknowledgements = inRequiredTermsAndConditions; + + return CHIP_NO_ERROR; +} + +CHIP_ERROR chip::app::DefaultTermsAndConditionsProvider::CommitAcceptance() +{ + VerifyOrReturnValue(nullptr != mTermsAndConditionsStorageDelegate, CHIP_ERROR_UNINITIALIZED); + + // No terms and conditions to commit + VerifyOrReturnValue(mTemporalAcceptance.HasValue(), CHIP_NO_ERROR); + + ReturnErrorOnFailure(mTermsAndConditionsStorageDelegate->Set(mTemporalAcceptance.Value())); + ChipLogProgress(AppServer, "Terms and conditions have been committed"); + mTemporalAcceptance.ClearValue(); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR chip::app::DefaultTermsAndConditionsProvider::GetAcceptance(Optional & outTermsAndConditions) const +{ + VerifyOrReturnValue(nullptr != mTermsAndConditionsStorageDelegate, CHIP_ERROR_UNINITIALIZED); + + // Return the in-memory acceptance state + if (mTemporalAcceptance.HasValue()) + { + outTermsAndConditions = mTemporalAcceptance; + return CHIP_NO_ERROR; + } + + // Otherwise, try to get the persisted acceptance state + CHIP_ERROR err = mTermsAndConditionsStorageDelegate->Get(outTermsAndConditions); + VerifyOrReturnValue(CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND == err || CHIP_NO_ERROR == err, err); + + if (CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND == err) + { + ChipLogError(AppServer, "No terms and conditions have been accepted"); + outTermsAndConditions.ClearValue(); + return CHIP_NO_ERROR; + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR chip::app::DefaultTermsAndConditionsProvider::GetAcknowledgementsRequired(bool & outAcknowledgementsRequired) const +{ + Optional requiredTermsAndConditionsMaybe; + ReturnErrorOnFailure(GetRequirements(requiredTermsAndConditionsMaybe)); + + if (!requiredTermsAndConditionsMaybe.HasValue()) + { + outAcknowledgementsRequired = false; + return CHIP_NO_ERROR; + } + + Optional acceptedTermsAndConditionsMaybe; + ReturnErrorOnFailure(GetAcceptance(acceptedTermsAndConditionsMaybe)); + + if (!acceptedTermsAndConditionsMaybe.HasValue()) + { + outAcknowledgementsRequired = true; + return CHIP_NO_ERROR; + } + + TermsAndConditions requiredTermsAndConditions = requiredTermsAndConditionsMaybe.Value(); + TermsAndConditions acceptedTermsAndConditions = acceptedTermsAndConditionsMaybe.Value(); + outAcknowledgementsRequired = requiredTermsAndConditions.Validate(acceptedTermsAndConditions); + return CHIP_NO_ERROR; +} + +CHIP_ERROR chip::app::DefaultTermsAndConditionsProvider::GetRequirements(Optional & outTermsAndConditions) const +{ + outTermsAndConditions = mRequiredAcknowledgements; + return CHIP_NO_ERROR; +} + +CHIP_ERROR +chip::app::DefaultTermsAndConditionsProvider::GetUpdateAcceptanceDeadline(Optional & outUpdateAcceptanceDeadline) const +{ + // No-op stub implementation. This feature is not implemented in this default implementation. + outUpdateAcceptanceDeadline = Optional(); + return CHIP_NO_ERROR; +} + +CHIP_ERROR chip::app::DefaultTermsAndConditionsProvider::ResetAcceptance() +{ + VerifyOrReturnValue(nullptr != mTermsAndConditionsStorageDelegate, CHIP_ERROR_UNINITIALIZED); + + (void) mTermsAndConditionsStorageDelegate->Delete(); + ReturnErrorOnFailure(RevertAcceptance()); + return CHIP_NO_ERROR; +} + +CHIP_ERROR chip::app::DefaultTermsAndConditionsProvider::RevertAcceptance() +{ + mTemporalAcceptance.ClearValue(); + return CHIP_NO_ERROR; +} + +CHIP_ERROR chip::app::DefaultTermsAndConditionsProvider::SetAcceptance(const Optional & inTermsAndConditions) +{ + mTemporalAcceptance = inTermsAndConditions; + return CHIP_NO_ERROR; +} diff --git a/src/app/server/DefaultTermsAndConditionsProvider.h b/src/app/server/DefaultTermsAndConditionsProvider.h new file mode 100644 index 00000000000000..8bc3d0761b3e21 --- /dev/null +++ b/src/app/server/DefaultTermsAndConditionsProvider.h @@ -0,0 +1,152 @@ +/* + * + * 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 "TermsAndConditionsProvider.h" + +#include + +#include +#include +#include + +namespace chip { +namespace app { + +/** + * @brief Abstract interface for storing and retrieving terms and conditions acceptance status. + * + * This class defines the methods required to interact with the underlying storage system + * for saving, retrieving, and deleting the user's acceptance of terms and conditions. + */ +class TermsAndConditionsStorageDelegate +{ +public: + virtual ~TermsAndConditionsStorageDelegate() = default; + + /** + * @brief Deletes the persisted terms and conditions acceptance status from storage. + * + * This method deletes the stored record of the user's acceptance of the terms and conditions, + * effectively resetting their acceptance status in the persistent storage. + * + * @retval CHIP_NO_ERROR if the record was successfully deleted. + * @retval CHIP_ERROR_UNINITIALIZED if the storage delegate is not properly initialized. + * @retval CHIP_ERROR_* for other errors. + */ + virtual CHIP_ERROR Delete() = 0; + + /** + * @brief Retrieves the persisted terms and conditions acceptance status from storage. + * + * This method attempts to retrieve the previously accepted terms and conditions from + * persistent storage. If no such record exists, it returns an empty `Optional`. + * + * @param[out] outTermsAndConditions The retrieved terms and conditions, if any exist. + * + * @retval CHIP_NO_ERROR if the terms were successfully retrieved. + * @retval CHIP_ERROR_UNINITIALIZED if the storage delegate is not properly initialized. + * @retval CHIP_ERROR_* for other errors. + */ + virtual CHIP_ERROR Get(Optional & outTermsAndConditions) = 0; + + /** + * @brief Persists the user's acceptance of the terms and conditions. + * + * This method stores the provided terms and conditions acceptance status in persistent + * storage, allowing the user's acceptance to be retrieved later. + * + * @param[in] inTermsAndConditions The terms and conditions to be saved. + * + * @retval CHIP_NO_ERROR if the terms were successfully stored. + * @retval CHIP_ERROR_UNINITIALIZED if the storage delegate is not properly initialized. + * @retval CHIP_ERROR_* for other errors. + */ + virtual CHIP_ERROR Set(const TermsAndConditions & inTermsAndConditions) = 0; +}; + +/** + * @brief Default implementation of the TermsAndConditionsStorageDelegate using a persistent storage backend. + * + * This class provides an implementation of the TermsAndConditionsStorageDelegate interface, storing + * and retrieving the user's terms and conditions acceptance from persistent storage. It requires a + * PersistentStorageDelegate to interface with the storage system. + */ +class DefaultTermsAndConditionsStorageDelegate : public TermsAndConditionsStorageDelegate +{ +public: + /** + * @brief Initializes the storage delegate with a persistent storage backend. + * + * This method initializes the storage delegate with the provided persistent storage delegate. + * The storage delegate must be initialized before performing any operations. + * + * @param[in] inPersistentStorageDelegate The storage backend used for saving and retrieving data. + * + * @retval CHIP_NO_ERROR if the storage delegate was successfully initialized. + * @retval CHIP_ERROR_INVALID_ARGUMENT if the provided storage delegate is null. + */ + CHIP_ERROR Init(PersistentStorageDelegate * inPersistentStorageDelegate); + + CHIP_ERROR Delete() override; + + CHIP_ERROR Get(Optional & inTermsAndConditions) override; + + CHIP_ERROR Set(const TermsAndConditions & inTermsAndConditions) override; + +private: + PersistentStorageDelegate * mStorageDelegate = nullptr; +}; + +class DefaultTermsAndConditionsProvider : public TermsAndConditionsProvider +{ +public: + /** + * @brief Initializes the TermsAndConditionsProvider. + * + * @param[in] inStorageDelegate Storage delegate dependency. + * @param[in] inRequiredTermsAndConditions The required terms and conditions that must be met. + */ + CHIP_ERROR Init(TermsAndConditionsStorageDelegate * inStorageDelegate, + const Optional & inRequiredTermsAndConditions); + + CHIP_ERROR CommitAcceptance() override; + + CHIP_ERROR GetAcceptance(Optional & outTermsAndConditions) const override; + + CHIP_ERROR GetAcknowledgementsRequired(bool & outAcknowledgementsRequired) const override; + + CHIP_ERROR GetRequirements(Optional & outTermsAndConditions) const override; + + CHIP_ERROR GetUpdateAcceptanceDeadline(Optional & outUpdateAcceptanceDeadline) const override; + + CHIP_ERROR ResetAcceptance() override; + + CHIP_ERROR RevertAcceptance() override; + + CHIP_ERROR SetAcceptance(const Optional & inTermsAndConditions) override; + +private: + TermsAndConditionsStorageDelegate * mTermsAndConditionsStorageDelegate; + Optional mTemporalAcceptance; + Optional mRequiredAcknowledgements; +}; + +} // namespace app +} // namespace chip diff --git a/src/app/server/TermsAndConditionsManager.cpp b/src/app/server/TermsAndConditionsManager.cpp new file mode 100644 index 00000000000000..4946bf37d2611f --- /dev/null +++ b/src/app/server/TermsAndConditionsManager.cpp @@ -0,0 +1,80 @@ +/* + * + * 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 "TermsAndConditionsManager.h" + +#include "DefaultTermsAndConditionsProvider.h" + +static chip::app::TermsAndConditionsManager sTermsAndConditionsManager; +static chip::app::DefaultTermsAndConditionsProvider sTermsAndConditionsProviderInstance; +static chip::app::DefaultTermsAndConditionsStorageDelegate sTermsAndConditionsStorageDelegateInstance; + +chip::app::TermsAndConditionsManager * chip::app::TermsAndConditionsManager::GetInstance() +{ + return &sTermsAndConditionsManager; +} + +CHIP_ERROR chip::app::TermsAndConditionsManager::Init(chip::PersistentStorageDelegate * inPersistentStorageDelegate, + const Optional & inRequiredTermsAndConditions) +{ + ReturnErrorOnFailure(sTermsAndConditionsStorageDelegateInstance.Init(inPersistentStorageDelegate)); + ReturnErrorOnFailure( + sTermsAndConditionsProviderInstance.Init(&sTermsAndConditionsStorageDelegateInstance, inRequiredTermsAndConditions)); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR chip::app::TermsAndConditionsManager::CommitAcceptance() +{ + return sTermsAndConditionsProviderInstance.CommitAcceptance(); +} + +CHIP_ERROR chip::app::TermsAndConditionsManager::GetAcceptance(Optional & outTermsAndConditions) const +{ + return sTermsAndConditionsProviderInstance.GetAcceptance(outTermsAndConditions); +} + +CHIP_ERROR chip::app::TermsAndConditionsManager::GetAcknowledgementsRequired(bool & outAcknowledgementsRequired) const +{ + return sTermsAndConditionsProviderInstance.GetAcknowledgementsRequired(outAcknowledgementsRequired); +} + +CHIP_ERROR chip::app::TermsAndConditionsManager::GetRequirements(Optional & outTermsAndConditions) const +{ + return sTermsAndConditionsProviderInstance.GetRequirements(outTermsAndConditions); +} + +CHIP_ERROR chip::app::TermsAndConditionsManager::GetUpdateAcceptanceDeadline(Optional & outUpdateAcceptanceDeadline) const +{ + return sTermsAndConditionsProviderInstance.GetUpdateAcceptanceDeadline(outUpdateAcceptanceDeadline); +} + +CHIP_ERROR chip::app::TermsAndConditionsManager::ResetAcceptance() +{ + return sTermsAndConditionsProviderInstance.ResetAcceptance(); +} + +CHIP_ERROR chip::app::TermsAndConditionsManager::RevertAcceptance() +{ + return sTermsAndConditionsProviderInstance.RevertAcceptance(); +} + +CHIP_ERROR chip::app::TermsAndConditionsManager::SetAcceptance(const Optional & inTermsAndConditions) +{ + return sTermsAndConditionsProviderInstance.SetAcceptance(inTermsAndConditions); +} diff --git a/src/app/server/TermsAndConditionsManager.h b/src/app/server/TermsAndConditionsManager.h new file mode 100644 index 00000000000000..02101bbec46425 --- /dev/null +++ b/src/app/server/TermsAndConditionsManager.h @@ -0,0 +1,45 @@ +/* + * + * 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 "TermsAndConditionsProvider.h" + +namespace chip { +namespace app { + +class TermsAndConditionsManager : public TermsAndConditionsProvider +{ +public: + static TermsAndConditionsManager * GetInstance(); + CHIP_ERROR Init(PersistentStorageDelegate * inPersistentStorageDelegate, + const Optional & inRequiredTermsAndConditions); + CHIP_ERROR CommitAcceptance(); + CHIP_ERROR GetAcceptance(Optional & outTermsAndConditions) const; + CHIP_ERROR GetAcknowledgementsRequired(bool & outAcknowledgementsRequired) const; + CHIP_ERROR GetRequirements(Optional & outTermsAndConditions) const; + CHIP_ERROR GetUpdateAcceptanceDeadline(Optional & outUpdateAcceptanceDeadline) const; + CHIP_ERROR ResetAcceptance(); + CHIP_ERROR RevertAcceptance(); + CHIP_ERROR SetAcceptance(const Optional & inTermsAndConditions); +}; + +} // namespace app +} // namespace chip diff --git a/src/app/server/TermsAndConditionsProvider.h b/src/app/server/TermsAndConditionsProvider.h new file mode 100644 index 00000000000000..cb0b6f0b8f088a --- /dev/null +++ b/src/app/server/TermsAndConditionsProvider.h @@ -0,0 +1,224 @@ +/* + * + * 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 + +namespace chip { +namespace app { + +/** + * @brief Represents a pair of terms and conditions value and version. + * + * This class encapsulates terms and conditions with methods to validate a user's accepted value and version against required + * criteria. + */ +class TermsAndConditions +{ +public: + TermsAndConditions(uint16_t inValue, uint16_t inVersion) : value(inValue), version(inVersion) {} + + bool operator==(const TermsAndConditions & other) const { return value == other.value && version == other.version; } + bool operator!=(const TermsAndConditions & other) const { return !(*this == other); } + + /** + * @brief Retrieves the terms and conditions value (accepted bits). + * + * @return The value of the terms and conditions. + */ + uint16_t GetValue() const { return value; } + + /** + * @brief Retrieves the terms and conditions version. + * + * @return The version of the terms and conditions. + */ + uint16_t GetVersion() const { return version; } + + /** + * @brief Validates the terms and conditions value. + * + * Checks whether all required bits are set in the accepted terms and conditions. + * + * @param acceptedTermsAndConditions The user's accepted terms and conditions. + * @return True if all required bits are set, false otherwise. + */ + bool ValidateValue(const TermsAndConditions & acceptedTermsAndConditions) const + { + // Check if all required bits are set in the user-accepted value. + return ((value & acceptedTermsAndConditions.GetValue()) == value); + } + + /** + * @brief Validates the terms and conditions version. + * + * Checks whether the accepted version is greater than or equal to the required version. + * + * @param acceptedTermsAndConditions The user's accepted terms and conditions. + * @return True if the accepted version is valid, false otherwise. + */ + bool ValidateVersion(const TermsAndConditions & acceptedTermsAndConditions) const + { + // Check if the version is below the minimum required version. + return (acceptedTermsAndConditions.GetVersion() >= version); + } + + /** + * @brief Validates the terms and conditions. + * + * Combines validation of both value and version to ensure compliance with requirements. + * + * @param acceptedTermsAndConditions The user's accepted terms and conditions. + * @return True if both value and version validations pass, false otherwise. + */ + bool Validate(const TermsAndConditions & acceptedTermsAndConditions) const + { + return ValidateVersion(acceptedTermsAndConditions) && ValidateValue(acceptedTermsAndConditions); + } + +private: + const uint16_t value; + const uint16_t version; +}; + +/** + * @brief Data access layer for handling the required terms and conditions and managing user acceptance status. + * + * This class provides methods to manage the acceptance of terms and conditions, including storing, retrieving, + * and verifying the acceptance status. It also supports temporary in-memory storage and persistent storage for + * accepted terms and conditions. + */ +class TermsAndConditionsProvider +{ +public: + virtual ~TermsAndConditionsProvider() = default; + + /** + * @brief Persists the acceptance of the terms and conditions. + * + * This method commits the in-memory acceptance status to persistent storage. It stores the acceptance + * status in a permanent location and clears the temporary in-memory acceptance state after committing. + * + * @retval CHIP_NO_ERROR if the terms were successfully persisted. + * @retval CHIP_ERROR_UNINITIALIZED if the module has not been initialized. + * @retval CHIP_ERROR_* for other errors. + */ + virtual CHIP_ERROR CommitAcceptance() = 0; + + /** + * @brief Retrieves the current acceptance status of the terms and conditions. + * + * This method checks the temporary in-memory acceptance state first. If no in-memory state is found, + * it attempts to retrieve the acceptance status from persistent storage. If no terms have been accepted, + * it returns an empty `Optional`. + * + * @param[out] outTermsAndConditions The current accepted terms and conditions, if any. + * + * @retval CHIP_NO_ERROR if the terms were successfully retrieved or no terms were found. + * @retval CHIP_ERROR_UNINITIALIZED if the module has not been initialized. + * @retval CHIP_ERROR_* for other errors. + */ + virtual CHIP_ERROR GetAcceptance(Optional & outTermsAndConditions) const = 0; + + /** + * @brief Determines if acknowledgments are required. + * + * @param[out] outAcknowledgementsRequired True if acknowledgments are required, false otherwise. + * + * @retval CHIP_NO_ERROR if successful. + * @retval CHIP_ERROR_UNINITIALIZED if the module has not been initialized. + * @retval CHIP_ERROR_* for other errors. + */ + virtual CHIP_ERROR GetAcknowledgementsRequired(bool & outAcknowledgementsRequired) const = 0; + + /** + * @brief Retrieves the requirements for the terms and conditions. + * + * This method retrieves the required terms and conditions that must be accepted by the user. These + * requirements are set by the provider and used to validate the acceptance. + * + * @param[out] outTermsAndConditions The required terms and conditions. + * + * @retval CHIP_NO_ERROR if the required terms were successfully retrieved. + * @retval CHIP_ERROR_UNINITIALIZED if the module has not been initialized. + * @retval CHIP_ERROR_* for other errors. + */ + virtual CHIP_ERROR GetRequirements(Optional & outTermsAndConditions) const = 0; + + /** + * @brief Retrieves the deadline for accepting updated terms and conditions. + * + * This method retrieves the deadline by which the user must accept updated terms and conditions. + * If no deadline is set, it returns an empty `Optional`. + * + * @param[out] outUpdateAcceptanceDeadline The deadline (in seconds) by which updated terms must be accepted. + * Returns empty Optional if no deadline is set. + * + * @retval CHIP_NO_ERROR if the deadline was successfully retrieved or no deadline was found. + * @retval CHIP_ERROR_UNINITIALIZED if the module has not been initialized. + * @retval CHIP_ERROR_* for other errors. + */ + virtual CHIP_ERROR GetUpdateAcceptanceDeadline(Optional & outUpdateAcceptanceDeadline) const = 0; + + /** + * @brief Resets the persisted acceptance status. + * + * This method deletes the persisted acceptance of the terms and conditions from storage, effectively + * resetting the stored acceptance status. Any in-memory temporary acceptance will also be cleared + * through this method. + * + * @retval CHIP_NO_ERROR if the terms were successfully reset. + * @retval CHIP_ERROR_UNINITIALIZED if the module has not been initialized. + * @retval CHIP_ERROR_* for other errors. + */ + virtual CHIP_ERROR ResetAcceptance() = 0; + + /** + * @brief Clears the in-memory temporary acceptance status. + * + * This method clears any temporary acceptance of the terms and conditions that is held in-memory. It does + * not affect the persisted state stored in storage. + * + * @retval CHIP_NO_ERROR if the in-memory acceptance state was successfully cleared. + * @retval CHIP_ERROR_UNINITIALIZED if the module has not been initialized. + * @retval CHIP_ERROR_* for other errors. + */ + virtual CHIP_ERROR RevertAcceptance() = 0; + + /** + * @brief Sets the temporary in-memory acceptance status of the terms and conditions. + * + * This method stores the provided terms and conditions acceptance status in-memory. It does not persist + * the acceptance status to storage. To persist the acceptance, call `CommitAcceptance()` after this method. + * + * @param[in] inTermsAndConditions The terms and conditions to be accepted temporarily. + * + * @retval CHIP_NO_ERROR if the terms were successfully stored in-memory. + * @retval CHIP_ERROR_INVALID_ARGUMENT if the provided terms and conditions are invalid. + * @retval CHIP_ERROR_UNINITIALIZED if the module has not been initialized. + * @retval CHIP_ERROR_* for other errors. + */ + virtual CHIP_ERROR SetAcceptance(const Optional & inTermsAndConditions) = 0; +}; + +} // namespace app +} // namespace chip diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index 912c1e32a0ef5a..1923573765101a 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Project CHIP Authors +# Copyright (c) 2020-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. @@ -211,6 +211,7 @@ chip_test_suite("tests") { "TestDataModelSerialization.cpp", "TestDefaultOTARequestorStorage.cpp", "TestDefaultSafeAttributePersistenceProvider.cpp", + "TestDefaultTermsAndConditionsProvider.cpp", "TestDefaultThreadNetworkDirectoryStorage.cpp", "TestEcosystemInformationCluster.cpp", "TestEventLoggingNoUTCTime.cpp", @@ -252,6 +253,8 @@ chip_test_suite("tests") { "${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/server", + "${chip_root}/src/app/server:terms_and_conditions", "${chip_root}/src/app/tests:helpers", "${chip_root}/src/app/util/mock:mock_codegen_data_model", "${chip_root}/src/app/util/mock:mock_ember", diff --git a/src/app/tests/TestDefaultTermsAndConditionsProvider.cpp b/src/app/tests/TestDefaultTermsAndConditionsProvider.cpp new file mode 100644 index 00000000000000..dc2a66278aa5d2 --- /dev/null +++ b/src/app/tests/TestDefaultTermsAndConditionsProvider.cpp @@ -0,0 +1,435 @@ +/* + * + * 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 "app/server/DefaultTermsAndConditionsProvider.h" +#include "app/server/TermsAndConditionsProvider.h" +#include "pw_unit_test/framework.h" + +#include +#include +#include +#include + +class TestTermsAndConditionsStorageDelegate : public chip::app::TermsAndConditionsStorageDelegate +{ +public: + TestTermsAndConditionsStorageDelegate(chip::Optional & initialTermsAndConditions) : + mTermsAndConditions(initialTermsAndConditions) + {} + + CHIP_ERROR Delete() + { + mTermsAndConditions.ClearValue(); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Get(chip::Optional & outTermsAndConditions) + { + outTermsAndConditions = mTermsAndConditions; + return CHIP_NO_ERROR; + } + + CHIP_ERROR Set(const chip::app::TermsAndConditions & inTermsAndConditions) + { + mTermsAndConditions = chip::Optional(inTermsAndConditions); + return CHIP_NO_ERROR; + } + +private: + chip::Optional & mTermsAndConditions; +}; + +TEST(DefaultTermsAndConditionsProvider, TestInitSuccess) +{ + CHIP_ERROR err; + + chip::TestPersistentStorageDelegate testPersistentStorageDelegate; + chip::app::DefaultTermsAndConditionsStorageDelegate defaultTermsAndConditionsStorageDelegate; + err = defaultTermsAndConditionsStorageDelegate.Init(&testPersistentStorageDelegate); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::app::DefaultTermsAndConditionsProvider defaultTermsAndConditionsProvider; + chip::Optional requiredTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(1, 1)); + err = defaultTermsAndConditionsProvider.Init(&defaultTermsAndConditionsStorageDelegate, requiredTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); +} + +TEST(DefaultTermsAndConditionsProvider, TestNoRequirementsGetRequirementsSuccess) +{ + CHIP_ERROR err; + + chip::TestPersistentStorageDelegate testPersistentStorageDelegate; + chip::app::DefaultTermsAndConditionsStorageDelegate defaultTermsAndConditionsStorageDelegate; + err = defaultTermsAndConditionsStorageDelegate.Init(&testPersistentStorageDelegate); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::app::DefaultTermsAndConditionsProvider defaultTermsAndConditionsProvider; + chip::Optional requiredTermsAndConditions = chip::Optional(); + err = defaultTermsAndConditionsProvider.Init(&defaultTermsAndConditionsStorageDelegate, requiredTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::Optional outTermsAndConditions; + err = defaultTermsAndConditionsProvider.GetAcceptance(outTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + EXPECT_FALSE(outTermsAndConditions.HasValue()); +} + +TEST(DefaultTermsAndConditionsProvider, TestNeverAcceptanceGetAcceptanceSuccess) +{ + CHIP_ERROR err; + + chip::TestPersistentStorageDelegate testPersistentStorageDelegate; + chip::app::DefaultTermsAndConditionsStorageDelegate defaultTermsAndConditionsStorageDelegate; + err = defaultTermsAndConditionsStorageDelegate.Init(&testPersistentStorageDelegate); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::app::DefaultTermsAndConditionsProvider defaultTermsAndConditionsProvider; + chip::Optional requiredTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(0b1111'1111'1111'1111, 1)); + err = defaultTermsAndConditionsProvider.Init(&defaultTermsAndConditionsStorageDelegate, requiredTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::Optional outTermsAndConditions; + err = defaultTermsAndConditionsProvider.GetAcceptance(outTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + EXPECT_FALSE(outTermsAndConditions.HasValue()); +} + +TEST(DefaultTermsAndConditionsProvider, TestTermsAcceptedPersistsSuccess) +{ + CHIP_ERROR err; + + chip::TestPersistentStorageDelegate testPersistentStorageDelegate; + chip::app::DefaultTermsAndConditionsStorageDelegate defaultTermsAndConditionsStorageDelegate; + err = defaultTermsAndConditionsStorageDelegate.Init(&testPersistentStorageDelegate); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::app::DefaultTermsAndConditionsProvider defaultTermsAndConditionsProvider; + chip::Optional requiredTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(1, 1)); + err = defaultTermsAndConditionsProvider.Init(&defaultTermsAndConditionsStorageDelegate, requiredTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::Optional newTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(1, 1)); + + err = defaultTermsAndConditionsProvider.SetAcceptance(newTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::Optional outTermsAndConditions; + err = defaultTermsAndConditionsProvider.GetAcceptance(outTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + EXPECT_EQ(1, outTermsAndConditions.Value().GetValue()); + EXPECT_EQ(1, outTermsAndConditions.Value().GetVersion()); + + err = defaultTermsAndConditionsProvider.CommitAcceptance(); + err = defaultTermsAndConditionsProvider.GetAcceptance(outTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + EXPECT_EQ(1, outTermsAndConditions.Value().GetValue()); + EXPECT_EQ(1, outTermsAndConditions.Value().GetVersion()); + + chip::app::DefaultTermsAndConditionsProvider anotherTncProvider; + err = anotherTncProvider.Init(&defaultTermsAndConditionsStorageDelegate, requiredTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + + err = anotherTncProvider.GetAcceptance(outTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + EXPECT_EQ(1, outTermsAndConditions.Value().GetValue()); + EXPECT_EQ(1, outTermsAndConditions.Value().GetVersion()); +} + +TEST(DefaultTermsAndConditionsProvider, TestTermsRequiredGetRequirementsSuccess) +{ + CHIP_ERROR err; + + chip::TestPersistentStorageDelegate testPersistentStorageDelegate; + chip::app::DefaultTermsAndConditionsStorageDelegate defaultTermsAndConditionsStorageDelegate; + err = defaultTermsAndConditionsStorageDelegate.Init(&testPersistentStorageDelegate); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::app::DefaultTermsAndConditionsProvider defaultTermsAndConditionsProvider; + chip::Optional requiredTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(1, 1)); + err = defaultTermsAndConditionsProvider.Init(&defaultTermsAndConditionsStorageDelegate, requiredTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::Optional outTermsAndConditions; + err = defaultTermsAndConditionsProvider.GetRequirements(outTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + EXPECT_EQ(1, outTermsAndConditions.Value().GetValue()); + EXPECT_EQ(1, outTermsAndConditions.Value().GetVersion()); +} + +TEST(DefaultTermsAndConditionsProvider, TestSetAcceptanceGetAcceptanceSuccess) +{ + CHIP_ERROR err; + + chip::TestPersistentStorageDelegate testPersistentStorageDelegate; + chip::app::DefaultTermsAndConditionsStorageDelegate defaultTermsAndConditionsStorageDelegate; + err = defaultTermsAndConditionsStorageDelegate.Init(&testPersistentStorageDelegate); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::app::DefaultTermsAndConditionsProvider defaultTermsAndConditionsProvider; + chip::Optional requiredTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(1, 1)); + err = defaultTermsAndConditionsProvider.Init(&defaultTermsAndConditionsStorageDelegate, requiredTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::Optional acceptedTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(1, 1)); + err = defaultTermsAndConditionsProvider.SetAcceptance(acceptedTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::Optional outTermsAndConditions; + err = defaultTermsAndConditionsProvider.GetRequirements(outTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + EXPECT_EQ(1, outTermsAndConditions.Value().GetValue()); + EXPECT_EQ(1, outTermsAndConditions.Value().GetVersion()); +} + +TEST(DefaultTermsAndConditionsProvider, TestRevertAcceptanceGetAcceptanceSuccess) +{ + CHIP_ERROR err; + + chip::TestPersistentStorageDelegate testPersistentStorageDelegate; + chip::app::DefaultTermsAndConditionsStorageDelegate defaultTermsAndConditionsStorageDelegate; + err = defaultTermsAndConditionsStorageDelegate.Init(&testPersistentStorageDelegate); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::app::DefaultTermsAndConditionsProvider defaultTermsAndConditionsProvider; + chip::Optional requiredTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(1, 1)); + err = defaultTermsAndConditionsProvider.Init(&defaultTermsAndConditionsStorageDelegate, requiredTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::Optional acceptedTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(1, 1)); + err = defaultTermsAndConditionsProvider.SetAcceptance(acceptedTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::Optional outTermsAndConditions; + err = defaultTermsAndConditionsProvider.GetRequirements(outTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + EXPECT_EQ(1, outTermsAndConditions.Value().GetValue()); + EXPECT_EQ(1, outTermsAndConditions.Value().GetVersion()); + + err = defaultTermsAndConditionsProvider.RevertAcceptance(); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::Optional outAcceptance2; + err = defaultTermsAndConditionsProvider.GetAcceptance(outAcceptance2); + EXPECT_EQ(CHIP_NO_ERROR, err); + EXPECT_FALSE(outAcceptance2.HasValue()); +} + +TEST(DefaultTermsAndConditionsProvider, TestAcceptanceRequiredTermsMissingFailure) +{ + CHIP_ERROR err; + + chip::TestPersistentStorageDelegate testPersistentStorageDelegate; + chip::app::DefaultTermsAndConditionsStorageDelegate defaultTermsAndConditionsStorageDelegate; + err = defaultTermsAndConditionsStorageDelegate.Init(&testPersistentStorageDelegate); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::app::DefaultTermsAndConditionsProvider defaultTermsAndConditionsProvider; + chip::Optional requiredTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(1, 1)); + err = defaultTermsAndConditionsProvider.Init(&defaultTermsAndConditionsStorageDelegate, requiredTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::Optional acceptedTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(1, 1)); + err = defaultTermsAndConditionsProvider.SetAcceptance(acceptedTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::Optional outAcknowledgementTermsAndConditions; + err = defaultTermsAndConditionsProvider.GetAcceptance(outAcknowledgementTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + EXPECT_EQ(1, outAcknowledgementTermsAndConditions.Value().GetValue()); + EXPECT_EQ(1, outAcknowledgementTermsAndConditions.Value().GetVersion()); + + err = defaultTermsAndConditionsProvider.RevertAcceptance(); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::Optional outRequiredTermsAndConditions; + err = defaultTermsAndConditionsProvider.GetRequirements(outRequiredTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + EXPECT_EQ(1, outRequiredTermsAndConditions.Value().GetValue()); + EXPECT_EQ(1, outRequiredTermsAndConditions.Value().GetVersion()); +} + +TEST(DefaultTermsAndConditionsProvider, TestAcceptanceCommitCheckSetRevertCheckExpectCommitValue) +{ + CHIP_ERROR err; + + chip::TestPersistentStorageDelegate testPersistentStorageDelegate; + chip::app::DefaultTermsAndConditionsStorageDelegate defaultTermsAndConditionsStorageDelegate; + err = defaultTermsAndConditionsStorageDelegate.Init(&testPersistentStorageDelegate); + EXPECT_EQ(CHIP_NO_ERROR, err); + + // Initialize unit under test + chip::app::DefaultTermsAndConditionsProvider defaultTermsAndConditionsProvider; + chip::Optional requiredTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(1, 1)); + err = defaultTermsAndConditionsProvider.Init(&defaultTermsAndConditionsStorageDelegate, requiredTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + + // Set acceptance + chip::Optional acceptedTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(0b1, 1)); + err = defaultTermsAndConditionsProvider.SetAcceptance(acceptedTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + + // Commit value + err = defaultTermsAndConditionsProvider.CommitAcceptance(); + EXPECT_EQ(CHIP_NO_ERROR, err); + + // Check commit value + chip::Optional outTermsAndConditions; + err = defaultTermsAndConditionsProvider.GetAcceptance(outTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + EXPECT_TRUE(outTermsAndConditions.HasValue()); + EXPECT_EQ(outTermsAndConditions.Value().GetValue(), acceptedTermsAndConditions.Value().GetValue()); + EXPECT_EQ(outTermsAndConditions.Value().GetVersion(), acceptedTermsAndConditions.Value().GetVersion()); + + // Set updated value + chip::Optional updatedTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(0b11, 2)); + err = defaultTermsAndConditionsProvider.SetAcceptance(updatedTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + + // Check updated value + err = defaultTermsAndConditionsProvider.GetAcceptance(outTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + EXPECT_TRUE(outTermsAndConditions.HasValue()); + EXPECT_EQ(outTermsAndConditions.Value().GetValue(), updatedTermsAndConditions.Value().GetValue()); + EXPECT_EQ(outTermsAndConditions.Value().GetVersion(), updatedTermsAndConditions.Value().GetVersion()); + + // Revert updated value + err = defaultTermsAndConditionsProvider.RevertAcceptance(); + EXPECT_EQ(CHIP_NO_ERROR, err); + + // Check committed value + err = defaultTermsAndConditionsProvider.GetAcceptance(outTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + EXPECT_TRUE(outTermsAndConditions.HasValue()); + EXPECT_EQ(outTermsAndConditions.Value().GetValue(), acceptedTermsAndConditions.Value().GetValue()); + EXPECT_EQ(outTermsAndConditions.Value().GetVersion(), acceptedTermsAndConditions.Value().GetVersion()); +} + +TEST(DefaultTermsAndConditionsProvider, TestRevertAcceptanceWhileMissing) +{ + CHIP_ERROR err; + + chip::TestPersistentStorageDelegate testPersistentStorageDelegate; + chip::app::DefaultTermsAndConditionsStorageDelegate defaultTermsAndConditionsStorageDelegate; + chip::app::DefaultTermsAndConditionsProvider defaultTermsAndConditionsProvider; + + chip::Optional requiredTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(1, 1)); + + chip::Optional outTermsAndConditions; + + err = defaultTermsAndConditionsStorageDelegate.Init(&testPersistentStorageDelegate); + EXPECT_EQ(CHIP_NO_ERROR, err); + + // Initialize unit under test [No conditions previously accepted] + err = defaultTermsAndConditionsProvider.Init(&defaultTermsAndConditionsStorageDelegate, requiredTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + + // [Fail-safe started] No conditions set during the fail-safe. No commit. + err = defaultTermsAndConditionsProvider.GetAcceptance(outTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + EXPECT_FALSE(outTermsAndConditions.HasValue()); + + // [Fail-safe expires] Revert is called. + err = defaultTermsAndConditionsProvider.RevertAcceptance(); + EXPECT_EQ(CHIP_NO_ERROR, err); + + // [New fail safe started (to retry the commissioning operations)] Confirm acceptance returns previous values (empty) + err = defaultTermsAndConditionsProvider.GetAcceptance(outTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + EXPECT_FALSE(outTermsAndConditions.HasValue()); +} + +TEST(DefaultTermsAndConditionsProvider, TestRevertAcceptanceWhenPreviouslyAccepted) +{ + CHIP_ERROR err; + + // Initialize unit under test [Conditions previously accepted] + chip::Optional initialTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(1, 1)); + chip::Optional requiredTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(0b11, 2)); + TestTermsAndConditionsStorageDelegate testTermsAndConditionsStorageDelegate(initialTermsAndConditions); + chip::app::DefaultTermsAndConditionsProvider defaultTermsAndConditionsProvider; + err = defaultTermsAndConditionsProvider.Init(&testTermsAndConditionsStorageDelegate, requiredTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + + // [Fail-safe started] No conditions set during the fail-safe. No commit. + + // [Fail-safe expires] Revert is called. + err = defaultTermsAndConditionsProvider.RevertAcceptance(); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::Optional outTermsAndConditions; + + // [New fail safe started (to retry the commissioning operations)] Confirm acceptance returns previous values (accepted) + err = defaultTermsAndConditionsProvider.GetAcceptance(outTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + EXPECT_TRUE(outTermsAndConditions.HasValue()); + EXPECT_EQ(outTermsAndConditions.Value().GetValue(), 1); + EXPECT_EQ(outTermsAndConditions.Value().GetVersion(), 1); +} + +TEST(DefaultTermsAndConditionsProvider, TestRevertAcceptanceWhenPreviouslyAcceptedThenUpdatedUnderFailsafe) +{ + CHIP_ERROR err; + + // Initialize unit under test dependency + chip::Optional initiallyAcceptedTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(1, 1)); + TestTermsAndConditionsStorageDelegate testTermsAndConditionsStorageDelegate(initiallyAcceptedTermsAndConditions); + + // Initialize unit under test [Conditions previously accepted] + chip::Optional requiredTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(0b11, 2)); + chip::app::DefaultTermsAndConditionsProvider defaultTermsAndConditionsProvider; + err = defaultTermsAndConditionsProvider.Init(&testTermsAndConditionsStorageDelegate, requiredTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + + // [Fail-safe started] Acceptance updated. + chip::Optional updatedAcceptedTermsAndConditions = + chip::Optional(chip::app::TermsAndConditions(0b111, 3)); + err = defaultTermsAndConditionsProvider.SetAcceptance(updatedAcceptedTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + + // [Fail-safe expires] Revert is called. + err = defaultTermsAndConditionsProvider.RevertAcceptance(); + EXPECT_EQ(CHIP_NO_ERROR, err); + + chip::Optional outTermsAndConditions; + + // [New fail safe started (to retry the commissioning operations)] Confirm acceptance returns previous values (accepted) + err = defaultTermsAndConditionsProvider.GetAcceptance(outTermsAndConditions); + EXPECT_EQ(CHIP_NO_ERROR, err); + EXPECT_TRUE(outTermsAndConditions.HasValue()); + EXPECT_EQ(outTermsAndConditions.Value().GetValue(), initiallyAcceptedTermsAndConditions.Value().GetValue()); + EXPECT_EQ(outTermsAndConditions.Value().GetVersion(), initiallyAcceptedTermsAndConditions.Value().GetVersion()); +} diff --git a/src/include/platform/CHIPDeviceEvent.h b/src/include/platform/CHIPDeviceEvent.h index 09f4c46b652920..9618d93f5faa05 100644 --- a/src/include/platform/CHIPDeviceEvent.h +++ b/src/include/platform/CHIPDeviceEvent.h @@ -534,6 +534,7 @@ struct ChipDeviceEvent final FabricIndex fabricIndex; bool addNocCommandHasBeenInvoked; bool updateNocCommandHasBeenInvoked; + bool updateTermsAndConditionsHasBeenInvoked; } FailSafeTimerExpired; struct diff --git a/src/lib/support/DefaultStorageKeyAllocator.h b/src/lib/support/DefaultStorageKeyAllocator.h index 9ed8a2f56cfd77..b0de78d085e48d 100644 --- a/src/lib/support/DefaultStorageKeyAllocator.h +++ b/src/lib/support/DefaultStorageKeyAllocator.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-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. @@ -256,6 +256,10 @@ class DefaultStorageKeyAllocator // when new fabric is created, this list needs to be updated, // when client init DefaultICDClientStorage, this table needs to be loaded. static StorageKeyName ICDFabricList() { return StorageKeyName::FromConst("g/icdfl"); } + + // Terms and Conditions Acceptance Key + // Stores the terms and conditions acceptance including terms and conditions revision, TLV encoded + static StorageKeyName TermsAndConditionsAcceptance() { return StorageKeyName::FromConst("g/tc"); } }; } // namespace chip From e394994d39e541379f4b20fa40d8b628f8c271b1 Mon Sep 17 00:00:00 2001 From: Martin Girardot <165289184+Martin-NXP@users.noreply.github.com> Date: Tue, 17 Dec 2024 15:12:01 +0100 Subject: [PATCH 58/72] Custom BLE data at application layer (#36857) * [Zephyr] Add support to custom BLE advertising data at application layer Signed-off-by: Martin Girardot * [NXP][RTs] Add support to custom advertising data at application layer Signed-off-by: Martin Girardot * [NXP][examples[common] Add support to custom advertising data at application layer Signed-off-by: Martin Girardot * [NXP] Update nxp matter support submodule Signed-off-by: Martin Girardot * Restyled by whitespace * Restyled by clang-format * Restyled by gn * [NXP] update BLE include path Signed-off-by: Martin Girardot * Restyled by clang-format --------- Signed-off-by: Martin Girardot Co-authored-by: Restyled.io --- config/zephyr/Kconfig | 7 + .../nxp/common/main/AppTask.cpp | 3 + .../all-clusters-app/nxp/rt/rt1060/BUILD.gn | 4 + .../all-clusters-app/nxp/rt/rt1170/BUILD.gn | 4 + .../all-clusters-app/nxp/rt/rw61x/BUILD.gn | 4 + .../thermostat/nxp/common/main/AppTask.cpp | 11 + .../nxp/common/main/BleZephyrManagerApp.cpp | 100 ++++++ examples/thermostat/nxp/rt/rt1060/BUILD.gn | 16 + examples/thermostat/nxp/rt/rt1060/args.gni | 4 + examples/thermostat/nxp/rt/rt1170/BUILD.gn | 16 + examples/thermostat/nxp/rt/rt1170/args.gni | 4 + examples/thermostat/nxp/rt/rw61x/BUILD.gn | 16 + examples/thermostat/nxp/rt/rw61x/args.gni | 4 + examples/thermostat/nxp/zephyr/CMakeLists.txt | 11 + examples/thermostat/nxp/zephyr/prj.conf | 4 + src/platform/Zephyr/BLEManagerImpl.cpp | 31 +- src/platform/Zephyr/BLEManagerImpl.h | 8 + .../CHIPDeviceNXPPlatformDefaultConfig.h | 3 +- .../ble_zephyr/BLEAdvertisingArbiter.cpp | 31 +- .../common/ble_zephyr/BLEAdvertisingArbiter.h | 18 + .../nxp/common/ble_zephyr/BLEManagerImpl.cpp | 308 ++++++++++++++---- .../nxp/common/ble_zephyr/BLEManagerImpl.h | 18 +- third_party/nxp/nxp_matter_support | 2 +- 23 files changed, 545 insertions(+), 82 deletions(-) create mode 100644 examples/thermostat/nxp/common/main/BleZephyrManagerApp.cpp diff --git a/config/zephyr/Kconfig b/config/zephyr/Kconfig index d8717a625d3dd3..7b0ee1d15062d5 100644 --- a/config/zephyr/Kconfig +++ b/config/zephyr/Kconfig @@ -582,3 +582,10 @@ config CHIP_BLE_ADVERTISING_DURATION else the maximum duration time can be extended to 2880 minutes (48h). endif + +if BT +config CHIP_CUSTOM_BLE_ADV_DATA + bool "Use custom BLE advertising data" + help + Customization of BLE advertising data at the application layer +endif diff --git a/examples/all-clusters-app/nxp/common/main/AppTask.cpp b/examples/all-clusters-app/nxp/common/main/AppTask.cpp index 0b945d49561e43..702a63e89b5c8d 100644 --- a/examples/all-clusters-app/nxp/common/main/AppTask.cpp +++ b/examples/all-clusters-app/nxp/common/main/AppTask.cpp @@ -40,6 +40,9 @@ void AllClustersApp::AppTask::PostInitMatterStack() void AllClustersApp::AppTask::PostInitMatterServerInstance() { +#ifdef APP_BT_DEVICE_NAME + chip::DeviceLayer::ConnectivityMgr().SetBLEDeviceName(APP_BT_DEVICE_NAME); +#endif // Disable last fixed endpoint, which is used as a placeholder for all of the // supported clusters so that ZAP will generated the requisite code. emberAfEndpointEnableDisable(emberAfEndpointFromIndex(static_cast(emberAfFixedEndpointCount() - 1)), false); diff --git a/examples/all-clusters-app/nxp/rt/rt1060/BUILD.gn b/examples/all-clusters-app/nxp/rt/rt1060/BUILD.gn index beca71ac1002d8..d5a4936a48f5a0 100644 --- a/examples/all-clusters-app/nxp/rt/rt1060/BUILD.gn +++ b/examples/all-clusters-app/nxp/rt/rt1060/BUILD.gn @@ -223,6 +223,10 @@ rt_executable("all_cluster_app") { ] } + if (chip_enable_ble) { + defines += [ "APP_BT_DEVICE_NAME=\"NXP-AllClustersApp\"" ] + } + # 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) { diff --git a/examples/all-clusters-app/nxp/rt/rt1170/BUILD.gn b/examples/all-clusters-app/nxp/rt/rt1170/BUILD.gn index 70a0a4d640738c..edbd208506b824 100644 --- a/examples/all-clusters-app/nxp/rt/rt1170/BUILD.gn +++ b/examples/all-clusters-app/nxp/rt/rt1170/BUILD.gn @@ -188,6 +188,10 @@ rt_executable("all_cluster_app") { sources += [ "${common_example_dir}/wifi_connect/source/WifiConnect.cpp" ] } + if (chip_enable_ble) { + defines += [ "APP_BT_DEVICE_NAME=\"NXP-AllClustersApp\"" ] + } + # 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) { diff --git a/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn b/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn index 5b73da4bc92080..cb4e017b9b45bf 100644 --- a/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn +++ b/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn @@ -210,6 +210,10 @@ rt_executable("all_cluster_app") { sources += [ "${common_example_dir}/wifi_connect/source/WifiConnect.cpp" ] } + if (chip_enable_ble) { + defines += [ "APP_BT_DEVICE_NAME=\"NXP-AllClustersApp\"" ] + } + # 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) { diff --git a/examples/thermostat/nxp/common/main/AppTask.cpp b/examples/thermostat/nxp/common/main/AppTask.cpp index 8e3f8f1036a2e4..583e3c3dc1bbd4 100644 --- a/examples/thermostat/nxp/common/main/AppTask.cpp +++ b/examples/thermostat/nxp/common/main/AppTask.cpp @@ -24,6 +24,10 @@ #include #include +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#include "BLEApplicationManager.h" +#endif + using namespace chip; void ThermostatApp::AppTask::PreInitMatterStack() @@ -33,6 +37,13 @@ void ThermostatApp::AppTask::PreInitMatterStack() void ThermostatApp::AppTask::PostInitMatterStack() { +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#ifdef APP_BT_DEVICE_NAME + chip::DeviceLayer::ConnectivityMgr().SetBLEDeviceName(APP_BT_DEVICE_NAME); +#endif + /* BLEApplicationManager implemented per platform or left blank */ + chip::NXP::App::BleAppMgr().Init(); +#endif chip::app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(&chip::NXP::App::GetICDUtil()); } diff --git a/examples/thermostat/nxp/common/main/BleZephyrManagerApp.cpp b/examples/thermostat/nxp/common/main/BleZephyrManagerApp.cpp new file mode 100644 index 00000000000000..170ef3c4cc45ab --- /dev/null +++ b/examples/thermostat/nxp/common/main/BleZephyrManagerApp.cpp @@ -0,0 +1,100 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * Copyright 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. + */ + +#include "BLEApplicationManager.h" + +#include + +#include "BLEManagerImpl.h" +#include +#include +#include + +#define ADV_LEN 2 + +using namespace ::chip::DeviceLayer; +using namespace ::chip::DeviceLayer::Internal; +using namespace ::chip::NXP::App; + +BLEApplicationManager BLEApplicationManager::sInstance; + +struct ServiceData +{ + uint8_t uuid[2]; + chip::Ble::ChipBLEDeviceIdentificationInfo deviceIdInfo; +} __attribute__((packed)); + +ServiceData serviceData; +std::array advertisingData; +std::array scanResponseData; + +constexpr uint8_t kAdvertisingFlags = BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR; + +uint8_t manuf_data[ADV_LEN] = { + 0x25, + 0x00, +}; + +bt_uuid_16 UUID16_CHIPoBLEService = BT_UUID_INIT_16(0xFFF6); + +/** + * @brief Init BLE application manager + * + * In this example, the application manager is used to customize BLE advertising + * parameters. This example is provided for platforms with Zephyr BLE manager support. + * + * @note This example set custom Zephyr BLE manager Matter advertising parameters ( + * CONFIG_CHIP_CUSTOM_BLE_ADV_DATA for kconfig or ble_adv_data_custom for GN is set). + * To keep the advertising support for commissining, it is needed to register the whole + * adv data (adv flags + Matter adv data + custom adv data) and register scan + * response data as default adv and response data will be skipped. + * kAdvertisingFlags and manuf_data are given for examples, size of advertisingData and + * scanResponseData have to be set according to custom requirements. + * + * For custom Gatt services, APIs bt_gatt_service_register and bt_gatt_service_unregister + * could be called at application layer. It will not override Matter Gatt services but + * add new one. + * + * @note At the end of the commissioning advertising will be stopped. + * + * To start new advertising process, APIs : + * chip::DeviceLayer::BLEAdvertisingArbiter::InsertRequest + * chip::DeviceLayer::BLEAdvertisingArbiter::CancelRequest + * could be called. If InsertRequest API is called several time, only the request with the + * higher priority will be advertise. + * + */ +void BLEApplicationManager::Init(void) +{ + /* Register Matter adv data + custom adv data */ + static_assert(sizeof(serviceData) == 10, "Unexpected size of BLE advertising data!"); + const char * name = bt_get_name(); + const uint8_t nameSize = static_cast(strlen(name)); + Encoding::LittleEndian::Put16(serviceData.uuid, UUID16_CHIPoBLEService.val); + chip::DeviceLayer::ConfigurationMgr().GetBLEDeviceIdentificationInfo(serviceData.deviceIdInfo); + + advertisingData[0] = BT_DATA(BT_DATA_FLAGS, &kAdvertisingFlags, sizeof(kAdvertisingFlags)); + /* Matter adv data for commissining */ + advertisingData[1] = BT_DATA(BT_DATA_SVC_DATA16, &serviceData, sizeof(serviceData)); + /* Example of custom BLE adv data */ + advertisingData[2] = BT_DATA(BT_DATA_MANUFACTURER_DATA, manuf_data, ADV_LEN); + scanResponseData[0] = BT_DATA(BT_DATA_NAME_COMPLETE, name, nameSize); + chip::DeviceLayer::Internal::BLEMgrImpl().SetCustomAdvertising(Span(advertisingData)); + chip::DeviceLayer::Internal::BLEMgrImpl().SetCustomScanResponse(Span(scanResponseData)); +} diff --git a/examples/thermostat/nxp/rt/rt1060/BUILD.gn b/examples/thermostat/nxp/rt/rt1060/BUILD.gn index e57cc01b92b47b..c365ee9d47b4ca 100644 --- a/examples/thermostat/nxp/rt/rt1060/BUILD.gn +++ b/examples/thermostat/nxp/rt/rt1060/BUILD.gn @@ -147,6 +147,22 @@ rt_executable("thermostat") { "../../common/main/main.cpp", ] + if (chip_enable_ble) { + defines += [ "APP_BT_DEVICE_NAME=\"NXP-ThermostatApp\"" ] + include_dirs += [ "${common_example_dir}/app_ble/include" ] + if (ble_adv_data_custom) { + # to customize BLE advertising data + defines += [ "CONFIG_CHIP_CUSTOM_BLE_ADV_DATA=1" ] + include_dirs += [ "${chip_root}/src/platform/nxp/common/ble_zephyr" ] + sources += [ "../../common/main/BleZephyrManagerApp.cpp" ] + } else { + # Empty implementation, default matter advertising data + sources += [ + "${common_example_dir}/app_ble/source/BLEApplicationManagerEmpty.cpp", + ] + } + } + if (chip_with_diag_logs_demo) { include_dirs += [ "${common_example_dir}/diagnostic_logs/include", diff --git a/examples/thermostat/nxp/rt/rt1060/args.gni b/examples/thermostat/nxp/rt/rt1060/args.gni index c2d91a5db7bae7..d3fc29a80c4920 100644 --- a/examples/thermostat/nxp/rt/rt1060/args.gni +++ b/examples/thermostat/nxp/rt/rt1060/args.gni @@ -14,6 +14,10 @@ import("//build_overrides/chip.gni") +# Set to true to customized BLE advertising data at application layer, +# instead of default Zephyr BLE manager implementation advertising data +ble_adv_data_custom = true + # 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.gn b/examples/thermostat/nxp/rt/rt1170/BUILD.gn index abb7090f962559..3e03df43488247 100644 --- a/examples/thermostat/nxp/rt/rt1170/BUILD.gn +++ b/examples/thermostat/nxp/rt/rt1170/BUILD.gn @@ -135,6 +135,22 @@ rt_executable("thermostat") { "../../common/main/main.cpp", ] + if (chip_enable_ble) { + defines += [ "APP_BT_DEVICE_NAME=\"NXP-ThermostatApp\"" ] + include_dirs += [ "${common_example_dir}/app_ble/include" ] + if (ble_adv_data_custom) { + # to customize BLE advertising data + defines += [ "CONFIG_CHIP_CUSTOM_BLE_ADV_DATA=1" ] + include_dirs += [ "${chip_root}/src/platform/nxp/common/ble_zephyr" ] + sources += [ "../../common/main/BleZephyrManagerApp.cpp" ] + } else { + # Empty implementation, default matter advertising data + sources += [ + "${common_example_dir}/app_ble/source/BLEApplicationManagerEmpty.cpp", + ] + } + } + if (chip_with_diag_logs_demo) { include_dirs += [ "${common_example_dir}/diagnostic_logs/include", diff --git a/examples/thermostat/nxp/rt/rt1170/args.gni b/examples/thermostat/nxp/rt/rt1170/args.gni index c2d91a5db7bae7..d3fc29a80c4920 100644 --- a/examples/thermostat/nxp/rt/rt1170/args.gni +++ b/examples/thermostat/nxp/rt/rt1170/args.gni @@ -14,6 +14,10 @@ import("//build_overrides/chip.gni") +# Set to true to customized BLE advertising data at application layer, +# instead of default Zephyr BLE manager implementation advertising data +ble_adv_data_custom = true + # 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/rw61x/BUILD.gn b/examples/thermostat/nxp/rt/rw61x/BUILD.gn index 07a58e947756c6..6dd71061c010c5 100644 --- a/examples/thermostat/nxp/rt/rw61x/BUILD.gn +++ b/examples/thermostat/nxp/rt/rw61x/BUILD.gn @@ -145,6 +145,22 @@ rt_executable("thermostat") { "../../common/main/main.cpp", ] + if (chip_enable_ble) { + defines += [ "APP_BT_DEVICE_NAME=\"NXP-ThermostatApp\"" ] + include_dirs += [ "${common_example_dir}/app_ble/include" ] + if (ble_adv_data_custom) { + # to customize BLE advertising data + defines += [ "CONFIG_CHIP_CUSTOM_BLE_ADV_DATA=1" ] + include_dirs += [ "${chip_root}/src/platform/nxp/common/ble_zephyr" ] + sources += [ "../../common/main/BleZephyrManagerApp.cpp" ] + } else { + # Empty implementation, default matter advertising data + sources += [ + "${common_example_dir}/app_ble/source/BLEApplicationManagerEmpty.cpp", + ] + } + } + if (chip_with_diag_logs_demo) { include_dirs += [ "${common_example_dir}/diagnostic_logs/include", diff --git a/examples/thermostat/nxp/rt/rw61x/args.gni b/examples/thermostat/nxp/rt/rw61x/args.gni index c2d91a5db7bae7..d3fc29a80c4920 100644 --- a/examples/thermostat/nxp/rt/rw61x/args.gni +++ b/examples/thermostat/nxp/rt/rw61x/args.gni @@ -14,6 +14,10 @@ import("//build_overrides/chip.gni") +# Set to true to customized BLE advertising data at application layer, +# instead of default Zephyr BLE manager implementation advertising data +ble_adv_data_custom = true + # 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/zephyr/CMakeLists.txt b/examples/thermostat/nxp/zephyr/CMakeLists.txt index b478cfff9f2566..221e66e2451162 100644 --- a/examples/thermostat/nxp/zephyr/CMakeLists.txt +++ b/examples/thermostat/nxp/zephyr/CMakeLists.txt @@ -52,6 +52,7 @@ target_include_directories(app ${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/device_callbacks/include ${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/factory_data/include ${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/app_task/include + ${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/app_ble/include ) target_sources(app @@ -73,6 +74,16 @@ target_compile_definitions(app PUBLIC "EXTERNAL_FACTORY_DATA_PROVIDER_IMPL_HEADER=\"platform/nxp/zephyr/FactoryDataProviderImpl.h\"" ) +if(CONFIG_CHIP_CUSTOM_BLE_ADV_DATA) + target_sources(app PRIVATE + ${THERMOSTAT_NXP_COMMON_DIR}/main/BleZephyrManagerApp.cpp + ) +else() + target_sources(app PRIVATE + ${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/app_ble/source/BLEApplicationManagerEmpty.cpp + ) +endif() + if(CONFIG_CHIP_OTA_REQUESTOR) target_sources(app PRIVATE ${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/ota_requestor/source/OTARequestorInitiatorCommon.cpp diff --git a/examples/thermostat/nxp/zephyr/prj.conf b/examples/thermostat/nxp/zephyr/prj.conf index a2fa69056d517e..6e1ad43097242d 100644 --- a/examples/thermostat/nxp/zephyr/prj.conf +++ b/examples/thermostat/nxp/zephyr/prj.conf @@ -56,3 +56,7 @@ CONFIG_CHIP_LIB_SHELL=y # enable NET commands if desired # CONFIG_NET_SHELL=y CONFIG_CHIP_STATISTICS=y + +# To customized BLE advertising data at application layer, +# instead of default Zephyr BLE manager implementation advertising data +CONFIG_CHIP_CUSTOM_BLE_ADV_DATA=y diff --git a/src/platform/Zephyr/BLEManagerImpl.cpp b/src/platform/Zephyr/BLEManagerImpl.cpp index 49751da62479e3..6b8ba4b6989ce6 100644 --- a/src/platform/Zephyr/BLEManagerImpl.cpp +++ b/src/platform/Zephyr/BLEManagerImpl.cpp @@ -284,6 +284,13 @@ struct BLEManagerImpl::ServiceData inline CHIP_ERROR BLEManagerImpl::PrepareAdvertisingRequest() { +#ifdef CONFIG_CHIP_CUSTOM_BLE_ADV_DATA + if (mCustomAdvertising.empty()) + { + ChipLogError(DeviceLayer, "mCustomAdvertising should be set when CONFIG_CHIP_CUSTOM_BLE_ADV_DATA is define"); + return CHIP_ERROR_INTERNAL; + } +#else static ServiceData serviceData; static std::array advertisingData; static std::array scanResponseData; @@ -304,9 +311,10 @@ inline CHIP_ERROR BLEManagerImpl::PrepareAdvertisingRequest() } #endif - advertisingData[0] = BT_DATA(BT_DATA_FLAGS, &kAdvertisingFlags, sizeof(kAdvertisingFlags)); - advertisingData[1] = BT_DATA(BT_DATA_SVC_DATA16, &serviceData, sizeof(serviceData)); - scanResponseData[0] = BT_DATA(BT_DATA_NAME_COMPLETE, name, nameSize); + advertisingData[0] = BT_DATA(BT_DATA_FLAGS, &kAdvertisingFlags, sizeof(kAdvertisingFlags)); + advertisingData[1] = BT_DATA(BT_DATA_SVC_DATA16, &serviceData, sizeof(serviceData)); + scanResponseData[0] = BT_DATA(BT_DATA_NAME_COMPLETE, name, nameSize); +#endif // CONFIG_CHIP_CUSTOM_BLE_ADV_DATA mAdvertisingRequest.priority = CHIP_DEVICE_BLE_ADVERTISING_PRIORITY; mAdvertisingRequest.options = kAdvertisingOptions; @@ -328,9 +336,13 @@ inline CHIP_ERROR BLEManagerImpl::PrepareAdvertisingRequest() mAdvertisingRequest.minInterval = CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN; mAdvertisingRequest.maxInterval = CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX; } +#ifdef CONFIG_CHIP_CUSTOM_BLE_ADV_DATA + mAdvertisingRequest.advertisingData = mCustomAdvertising; + mAdvertisingRequest.scanResponseData = mCustomScanResponse; +#else mAdvertisingRequest.advertisingData = Span(advertisingData); mAdvertisingRequest.scanResponseData = nameSize ? Span(scanResponseData) : Span{}; - +#endif mAdvertisingRequest.onStarted = [](int rc) { if (rc == 0) { @@ -967,6 +979,17 @@ ssize_t BLEManagerImpl::HandleC3Read(struct bt_conn * conId, const struct bt_gat } #endif +#ifdef CONFIG_CHIP_CUSTOM_BLE_ADV_DATA +void BLEManagerImpl::SetCustomAdvertising(Span CustomAdvertising) +{ + mCustomAdvertising = CustomAdvertising; +} +void BLEManagerImpl::SetCustomScanResponse(Span CustomScanResponse) +{ + mCustomScanResponse = CustomScanResponse; +} +#endif + } // namespace Internal } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Zephyr/BLEManagerImpl.h b/src/platform/Zephyr/BLEManagerImpl.h index 8c09ed457f94b2..9e83dc47ed6ae6 100644 --- a/src/platform/Zephyr/BLEManagerImpl.h +++ b/src/platform/Zephyr/BLEManagerImpl.h @@ -105,6 +105,10 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla #endif // The summarized number of Bluetooth LE connections related to the device (including these not related to Matter service). uint16_t mTotalConnNum; +#ifdef CONFIG_CHIP_CUSTOM_BLE_ADV_DATA + Span mCustomAdvertising = {}; + Span mCustomScanResponse = {}; +#endif void DriveBLEState(void); CHIP_ERROR PrepareAdvertisingRequest(); @@ -150,6 +154,10 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla #if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING static ssize_t HandleC3Read(struct bt_conn * conn, const struct bt_gatt_attr * attr, void * buf, uint16_t len, uint16_t offset); #endif +#ifdef CONFIG_CHIP_CUSTOM_BLE_ADV_DATA + void SetCustomAdvertising(Span CustomAdvertising); + void SetCustomScanResponse(Span CustomScanResponse); +#endif }; /** diff --git a/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h b/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h index 5e5fd2b14d5fea..79ceb200dbe1c5 100644 --- a/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h +++ b/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h @@ -85,7 +85,8 @@ #ifndef CHIP_DEVICE_BLE_ADVERTISING_PRIORITY /// Priority of the Matter BLE advertising when there are multiple application /// components that compete for the BLE advertising. -#define CHIP_DEVICE_BLE_ADVERTISING_PRIORITY 0 +/// Increase priority to 1 to allow user to insert custom advertising data with higher priority (0) +#define CHIP_DEVICE_BLE_ADVERTISING_PRIORITY 1 #endif // CHIP_DEVICE_BLE_ADVERTISING_PRIORITY // ========== Platform-specific Configuration ========= diff --git a/src/platform/nxp/common/ble_zephyr/BLEAdvertisingArbiter.cpp b/src/platform/nxp/common/ble_zephyr/BLEAdvertisingArbiter.cpp index ee6b91da3f9c7e..f66b98317e27e3 100644 --- a/src/platform/nxp/common/ble_zephyr/BLEAdvertisingArbiter.cpp +++ b/src/platform/nxp/common/ble_zephyr/BLEAdvertisingArbiter.cpp @@ -29,6 +29,9 @@ namespace { // List of advertising requests ordered by priority sys_slist_t sRequests; +bool sIsInitialized = false; +uint8_t sBtId = 0; + // Cast an intrusive list node to the containing request object const BLEAdvertisingArbiter::Request & ToRequest(const sys_snode_t * node) { @@ -55,8 +58,9 @@ CHIP_ERROR RestartAdvertising() ReturnErrorOnFailure(MapErrorZephyr(bt_le_adv_stop())); 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); + 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); + params.id = sBtId; const int result = bt_le_adv_start(¶ms, top.advertisingData.data(), top.advertisingData.size(), top.scanResponseData.data(), top.scanResponseData.size()); @@ -70,8 +74,26 @@ CHIP_ERROR RestartAdvertising() } // namespace +CHIP_ERROR Init(uint8_t btId) +{ + if (sIsInitialized) + { + return CHIP_ERROR_INCORRECT_STATE; + } + + sBtId = btId; + sIsInitialized = true; + + return CHIP_NO_ERROR; +} + CHIP_ERROR InsertRequest(Request & request) { + if (!sIsInitialized) + { + return CHIP_ERROR_INCORRECT_STATE; + } + CancelRequest(request); sys_snode_t * prev = nullptr; @@ -109,6 +131,11 @@ CHIP_ERROR InsertRequest(Request & request) void CancelRequest(Request & request) { + if (!sIsInitialized) + { + return; + } + const bool isTopPriority = (sys_slist_peek_head(&sRequests) == &request); VerifyOrReturn(sys_slist_find_and_remove(&sRequests, &request)); diff --git a/src/platform/nxp/common/ble_zephyr/BLEAdvertisingArbiter.h b/src/platform/nxp/common/ble_zephyr/BLEAdvertisingArbiter.h index 11a90c7070cd0a..0204a406244eab 100644 --- a/src/platform/nxp/common/ble_zephyr/BLEAdvertisingArbiter.h +++ b/src/platform/nxp/common/ble_zephyr/BLEAdvertisingArbiter.h @@ -62,6 +62,18 @@ struct Request : public sys_snode_t OnAdvertisingStopped onStopped; ///< (Optional) Callback invoked when the request stops being top-priority. }; +/** + * @brief Initialize BLE advertising arbiter + * + * @note This method must be called before trying to insert or cancel any requests. + * + * @param btId Local Bluetooth LE identifier to be used for the advertising parameters. Currently Bluetooth LE identifier used in + * this method will be used for all advertising requests and changing it dynamically is not supported. + * @return error If the module is already initialized. + * @return success Otherwise. + */ +CHIP_ERROR Init(uint8_t btId); + /** * @brief Request BLE advertising * @@ -75,6 +87,9 @@ struct Request : public sys_snode_t * @note This method does not take ownership of the request object so the object * must not get destroyed before it is cancelled. * + * @note The arbiter module has to be initialized using Init() method before + * invoking this method. + * * @param request Reference to advertising request that contains priority and * other advertising parameters. * @return error If the request is top-priority and failed to restart the @@ -95,6 +110,9 @@ CHIP_ERROR InsertRequest(Request & request); * An attempt to cancel a request that has not been registered at the * advertising arbiter is a no-op. That is, it returns immediately. * + * @note The arbiter module has to be initialized using Init() method before + * invoking this method. + * * @param request Reference to advertising request that contains priority and * other advertising parameters. */ diff --git a/src/platform/nxp/common/ble_zephyr/BLEManagerImpl.cpp b/src/platform/nxp/common/ble_zephyr/BLEManagerImpl.cpp index 0d1c4c0dcb8932..aca08a9339b243 100644 --- a/src/platform/nxp/common/ble_zephyr/BLEManagerImpl.cpp +++ b/src/platform/nxp/common/ble_zephyr/BLEManagerImpl.cpp @@ -27,9 +27,10 @@ #include "BLEManagerImpl.h" -#include +#include #include #include +#include #include #include #include @@ -44,6 +45,10 @@ #include #include +#ifdef CONFIG_BT_BONDABLE +#include +#endif // CONFIG_BT_BONDABLE + #include using namespace ::chip; @@ -70,12 +75,6 @@ const bt_uuid_128 UUID128_CHIPoBLEChar_C3 = bt_uuid_16 UUID16_CHIPoBLEService = BT_UUID_INIT_16(0xFFF6); -const ChipBleUUID chipUUID_CHIPoBLEChar_RX = { { 0x18, 0xEE, 0x2E, 0xF5, 0x26, 0x3D, 0x45, 0x59, 0x95, 0x9F, 0x4F, 0x9C, 0x42, 0x9F, - 0x9D, 0x11 } }; - -const ChipBleUUID chipUUID_CHIPoBLEChar_TX = { { 0x18, 0xEE, 0x2E, 0xF5, 0x26, 0x3D, 0x45, 0x59, 0x95, 0x9F, 0x4F, 0x9C, 0x42, 0x9F, - 0x9D, 0x12 } }; - _bt_gatt_ccc CHIPoBLEChar_TX_CCC = BT_GATT_CCC_INITIALIZER(nullptr, BLEManagerImpl::HandleTXCCCWrite, nullptr); // clang-format off @@ -107,7 +106,13 @@ bt_gatt_service sChipoBleService = BT_GATT_SERVICE(sChipoBleAttributes); // This value should be adjusted accordingly if the service declaration changes. constexpr int kCHIPoBLE_CCC_AttributeIndex = 3; -CHIP_ERROR InitRandomStaticAddress() +#ifdef CONFIG_BT_BONDABLE +constexpr uint8_t kMatterBleIdentity = 1; +#else +constexpr uint8_t kMatterBleIdentity = 0; +#endif // CONFIG_BT_BONDABLE + +int InitRandomStaticAddress(bool idPresent, int & id) { // Generate a random static address for the default identity. // This must be done before bt_enable() as after that updating the default identity is not possible. @@ -122,20 +127,29 @@ CHIP_ERROR InitRandomStaticAddress() if (error) { ChipLogError(DeviceLayer, "Failed to create BLE address: %d", error); - return MapErrorZephyr(error); + return error; } - error = bt_id_create(&addr, nullptr); + if (!idPresent) + { + id = bt_id_create(&addr, nullptr); + } +#if CONFIG_BT_ID_MAX == 2 + else + { + id = bt_id_reset(1, &addr, nullptr); + } +#endif // CONFIG_BT_BONDABLE - if (error < 0) + if (id < 0) { ChipLogError(DeviceLayer, "Failed to create BLE identity: %d", error); - return MapErrorZephyr(error); + return id; } ChipLogProgress(DeviceLayer, "BLE address: %02X:%02X:%02X:%02X:%02X:%02X", addr.a.val[5], addr.a.val[4], addr.a.val[3], addr.a.val[2], addr.a.val[1], addr.a.val[0]); - return CHIP_NO_ERROR; + return 0; } } // unnamed namespace @@ -144,16 +158,41 @@ BLEManagerImpl BLEManagerImpl::sInstance; CHIP_ERROR BLEManagerImpl::_Init() { + int err = 0; + int id = 0; + mServiceMode = ConnectivityManager::kCHIPoBLEServiceMode_Enabled; mFlags.ClearAll().Set(Flags::kAdvertisingEnabled, CHIP_DEVICE_CONFIG_CHIPOBLE_ENABLE_ADVERTISING_AUTOSTART); mFlags.Set(Flags::kFastAdvertisingEnabled, true); - mGAPConns = 0; + mMatterConnNum = 0; + mTotalConnNum = 0; memset(mSubscribedConns, 0, sizeof(mSubscribedConns)); - ReturnErrorOnFailure(InitRandomStaticAddress()); - int err = bt_enable(NULL); +#ifdef CONFIG_BT_BONDABLE + bt_addr_le_t idsAddr[CONFIG_BT_ID_MAX]; + size_t idsCount = CONFIG_BT_ID_MAX; + + err = bt_enable(nullptr); + + VerifyOrReturnError(err == 0, MapErrorZephyr(err)); + + settings_load(); + + bt_id_get(idsAddr, &idsCount); + + err = InitRandomStaticAddress(idsCount > 1, id); + + VerifyOrReturnError(err == 0 && id == kMatterBleIdentity, MapErrorZephyr(err)); + +#else + err = InitRandomStaticAddress(false, id); + VerifyOrReturnError(err == 0 && id == kMatterBleIdentity, MapErrorZephyr(err)); + err = bt_enable(nullptr); VerifyOrReturnError(err == 0, MapErrorZephyr(err)); +#endif // CONFIG_BT_BONDABLE + + BLEAdvertisingArbiter::Init(static_cast(id)); memset(&mConnCallbacks, 0, sizeof(mConnCallbacks)); mConnCallbacks.connected = HandleConnect; @@ -199,7 +238,13 @@ void BLEManagerImpl::DriveBLEState() { mFlags.Clear(Flags::kAdvertisingRefreshNeeded); err = StartAdvertising(); - SuccessOrExit(err); + if (err != CHIP_NO_ERROR) + { + // Return prematurely but keep the CHIPoBLE service mode enabled to allow advertising retries + mServiceMode = ConnectivityManager::kCHIPoBLEServiceMode_Enabled; + ChipLogError(DeviceLayer, "Could not start CHIPoBLE service due to error: %" CHIP_ERROR_FORMAT, err.Format()); + return; + } } } else @@ -207,7 +252,12 @@ void BLEManagerImpl::DriveBLEState() if (mFlags.Has(Flags::kAdvertising)) { err = StopAdvertising(); - SuccessOrExit(err); + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Disabling CHIPoBLE service due to error: %" CHIP_ERROR_FORMAT, err.Format()); + mServiceMode = ConnectivityManager::kCHIPoBLEServiceMode_Disabled; + return; + } } // If no connections are active unregister also CHIPoBLE GATT service @@ -224,13 +274,6 @@ void BLEManagerImpl::DriveBLEState() } } } - -exit: - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "Disabling CHIPoBLE service due to error: %" CHIP_ERROR_FORMAT, err.Format()); - mServiceMode = ConnectivityManager::kCHIPoBLEServiceMode_Disabled; - } } struct BLEManagerImpl::ServiceData @@ -241,6 +284,13 @@ struct BLEManagerImpl::ServiceData inline CHIP_ERROR BLEManagerImpl::PrepareAdvertisingRequest() { +#ifdef CONFIG_CHIP_CUSTOM_BLE_ADV_DATA + if (mCustomAdvertising.empty()) + { + ChipLogError(DeviceLayer, "mCustomAdvertising should be set when CONFIG_CHIP_CUSTOM_BLE_ADV_DATA is define"); + return CHIP_ERROR_INTERNAL; + } +#else static ServiceData serviceData; static std::array advertisingData; static std::array scanResponseData; @@ -252,21 +302,47 @@ inline CHIP_ERROR BLEManagerImpl::PrepareAdvertisingRequest() Encoding::LittleEndian::Put16(serviceData.uuid, UUID16_CHIPoBLEService.val); ReturnErrorOnFailure(ConfigurationMgr().GetBLEDeviceIdentificationInfo(serviceData.deviceIdInfo)); - advertisingData[0] = BT_DATA(BT_DATA_FLAGS, &kAdvertisingFlags, sizeof(kAdvertisingFlags)); - advertisingData[1] = BT_DATA(BT_DATA_SVC_DATA16, &serviceData, sizeof(serviceData)); - scanResponseData[0] = BT_DATA(BT_DATA_NAME_COMPLETE, name, nameSize); - - mAdvertisingRequest.priority = CHIP_DEVICE_BLE_ADVERTISING_PRIORITY; - mAdvertisingRequest.options = kAdvertisingOptions; - mAdvertisingRequest.minInterval = mFlags.Has(Flags::kFastAdvertisingEnabled) - ? CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN - : CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN; - mAdvertisingRequest.maxInterval = mFlags.Has(Flags::kFastAdvertisingEnabled) - ? CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX - : CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX; +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING + if (mFlags.Has(Flags::kExtendedAdvertisingEnabled)) + { + serviceData.deviceIdInfo.SetVendorId(DEVICE_HANDLE_NULL); + serviceData.deviceIdInfo.SetProductId(DEVICE_HANDLE_NULL); + serviceData.deviceIdInfo.SetExtendedAnnouncementFlag(true); + } +#endif + + advertisingData[0] = BT_DATA(BT_DATA_FLAGS, &kAdvertisingFlags, sizeof(kAdvertisingFlags)); + advertisingData[1] = BT_DATA(BT_DATA_SVC_DATA16, &serviceData, sizeof(serviceData)); + scanResponseData[0] = BT_DATA(BT_DATA_NAME_COMPLETE, name, nameSize); +#endif + + mAdvertisingRequest.priority = CHIP_DEVICE_BLE_ADVERTISING_PRIORITY; + mAdvertisingRequest.options = kAdvertisingOptions; + + if (mFlags.Has(Flags::kFastAdvertisingEnabled)) + { + mAdvertisingRequest.minInterval = CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN; + mAdvertisingRequest.maxInterval = CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX; + } +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING + else if (mFlags.Has(Flags::kExtendedAdvertisingEnabled)) + { + mAdvertisingRequest.minInterval = CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_MIN; + mAdvertisingRequest.maxInterval = CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_MAX; + } +#endif + else + { + mAdvertisingRequest.minInterval = CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN; + mAdvertisingRequest.maxInterval = CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX; + } +#ifdef CONFIG_CHIP_CUSTOM_BLE_ADV_DATA + mAdvertisingRequest.advertisingData = mCustomAdvertising; + mAdvertisingRequest.scanResponseData = mCustomScanResponse; +#else mAdvertisingRequest.advertisingData = Span(advertisingData); mAdvertisingRequest.scanResponseData = nameSize ? Span(scanResponseData) : Span{}; - +#endif mAdvertisingRequest.onStarted = [](int rc) { if (rc == 0) { @@ -275,29 +351,53 @@ inline CHIP_ERROR BLEManagerImpl::PrepareAdvertisingRequest() else { ChipLogError(DeviceLayer, "Failed to start CHIPoBLE advertising: %d", rc); + BLEManagerImpl().StopAdvertising(); } }; return CHIP_NO_ERROR; } -CHIP_ERROR BLEManagerImpl::StartAdvertising() +CHIP_ERROR BLEManagerImpl::RegisterGattService() { - // Prepare advertising request - ReturnErrorOnFailure(PrepareAdvertisingRequest()); - - // Register dynamically CHIPoBLE GATT service + // Register CHIPoBLE GATT service if (!mFlags.Has(Flags::kChipoBleGattServiceRegister)) { int err = bt_gatt_service_register(&sChipoBleService); - if (err != 0) - ChipLogError(DeviceLayer, "Failed to register CHIPoBLE GATT service"); + { + ChipLogError(DeviceLayer, "Failed to register CHIPoBLE GATT service: %d", err); + } VerifyOrReturnError(err == 0, MapErrorZephyr(err)); - mFlags.Set(Flags::kChipoBleGattServiceRegister); } + return CHIP_NO_ERROR; +} + +CHIP_ERROR BLEManagerImpl::UnregisterGattService() +{ + // Unregister CHIPoBLE GATT service + if (mFlags.Has(Flags::kChipoBleGattServiceRegister)) + { + int err = bt_gatt_service_unregister(&sChipoBleService); + if (err != 0) + { + ChipLogError(DeviceLayer, "Failed to unregister CHIPoBLE GATT service: %d", err); + } + + VerifyOrReturnError(err == 0, MapErrorZephyr(err)); + mFlags.Clear(Flags::kChipoBleGattServiceRegister); + } + return CHIP_NO_ERROR; +} + +CHIP_ERROR BLEManagerImpl::StartAdvertising() +{ + // Prepare advertising request + ReturnErrorOnFailure(PrepareAdvertisingRequest()); + // We need to register GATT service before issuing the advertising to start + ReturnErrorOnFailure(RegisterGattService()); // Initialize C3 characteristic data #if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING @@ -305,7 +405,13 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising() #endif // Request advertising - ReturnErrorOnFailure(BLEAdvertisingArbiter::InsertRequest(mAdvertisingRequest)); + CHIP_ERROR err = BLEAdvertisingArbiter::InsertRequest(mAdvertisingRequest); + if (CHIP_NO_ERROR != err) + { + // It makes not sense to keep GATT services registered after the advertising request failed + (void) UnregisterGattService(); + return err; + } // Transition to the Advertising state... if (!mFlags.Has(Flags::kAdvertising)) @@ -322,10 +428,17 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising() if (mFlags.Has(Flags::kFastAdvertisingEnabled)) { - // Start timer to change advertising interval. + // Start timer to change advertising interval from fast to slow. DeviceLayer::SystemLayer().StartTimer( System::Clock::Milliseconds32(CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME), - HandleBLEAdvertisementIntervalChange, this); + HandleSlowBLEAdvertisementInterval, this); + +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING + // Start timer to schedule start of the extended advertising + DeviceLayer::SystemLayer().StartTimer( + System::Clock::Milliseconds32(CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_CHANGE_TIME_MS), + HandleExtendedBLEAdvertisementInterval, this); +#endif } } @@ -342,6 +455,10 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising() mFlags.Clear(Flags::kAdvertising); mFlags.Set(Flags::kFastAdvertisingEnabled, true); +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING + mFlags.Clear(Flags::kExtendedAdvertisingEnabled); +#endif + ChipLogProgress(DeviceLayer, "CHIPoBLE advertising stopped"); // Post a CHIPoBLEAdvertisingChange(Stopped) event. @@ -353,7 +470,12 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising() } // Cancel timer event changing CHIPoBLE advertisement interval - DeviceLayer::SystemLayer().CancelTimer(HandleBLEAdvertisementIntervalChange, this); + DeviceLayer::SystemLayer().CancelTimer(HandleSlowBLEAdvertisementInterval, this); + DeviceLayer::SystemLayer().CancelTimer(HandleExtendedBLEAdvertisementInterval, this); + } + else + { + ChipLogProgress(DeviceLayer, "CHIPoBLE advertising already stopped"); } return CHIP_NO_ERROR; @@ -361,13 +483,13 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising() CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) { - if (mFlags.Has(Flags::kAdvertisingEnabled) != val) - { - ChipLogDetail(DeviceLayer, "CHIPoBLE advertising set to %s", val ? "on" : "off"); + ChipLogDetail(DeviceLayer, "CHIPoBLE advertising set to %s", val ? "on" : "off"); - mFlags.Set(Flags::kAdvertisingEnabled, val); - PlatformMgr().ScheduleWork(DriveBLEState, 0); - } + mFlags.Set(Flags::kAdvertisingEnabled, val); + // Ensure that each enabling/disabling of the general advertising clears + // the extended mode, to make sure we always start fresh in the regular mode + mFlags.Set(Flags::kExtendedAdvertisingEnabled, false); + PlatformMgr().ScheduleWork(DriveBLEState, 0); return CHIP_NO_ERROR; } @@ -378,8 +500,14 @@ CHIP_ERROR BLEManagerImpl::_SetAdvertisingMode(BLEAdvertisingMode mode) { case BLEAdvertisingMode::kFastAdvertising: mFlags.Set(Flags::kFastAdvertisingEnabled, true); + mFlags.Set(Flags::kExtendedAdvertisingEnabled, false); break; case BLEAdvertisingMode::kSlowAdvertising: + mFlags.Set(Flags::kFastAdvertisingEnabled, false); + mFlags.Set(Flags::kExtendedAdvertisingEnabled, false); + break; + case BLEAdvertisingMode::kExtendedAdvertising: + mFlags.Set(Flags::kExtendedAdvertisingEnabled, true); mFlags.Set(Flags::kFastAdvertisingEnabled, false); break; default: @@ -410,15 +538,13 @@ CHIP_ERROR BLEManagerImpl::HandleGAPConnect(const ChipDeviceEvent * event) if (connEvent->HciResult == BT_HCI_ERR_SUCCESS) { ChipLogProgress(DeviceLayer, "BLE connection established (ConnId: 0x%02x)", bt_conn_index(connEvent->BtConn)); - mGAPConns++; + mMatterConnNum++; } else { ChipLogError(DeviceLayer, "BLE connection failed (reason: 0x%02x)", connEvent->HciResult); } - ChipLogProgress(DeviceLayer, "Current number of connections: %u/%u", NumConnections(), CONFIG_BT_MAX_CONN); - mFlags.Set(Flags::kAdvertisingRefreshNeeded); PlatformMgr().ScheduleWork(DriveBLEState, 0); @@ -433,7 +559,10 @@ CHIP_ERROR BLEManagerImpl::HandleGAPDisconnect(const ChipDeviceEvent * event) ChipLogProgress(DeviceLayer, "BLE GAP connection terminated (reason 0x%02x)", connEvent->HciResult); - mGAPConns--; + if (mMatterConnNum > 0) + { + mMatterConnNum--; + } // If indications were enabled for this connection, record that they are now disabled and // notify the BLE Layer of a disconnect. @@ -461,8 +590,6 @@ CHIP_ERROR BLEManagerImpl::HandleGAPDisconnect(const ChipDeviceEvent * event) // Unref bt_conn before scheduling DriveBLEState. bt_conn_unref(connEvent->BtConn); - ChipLogProgress(DeviceLayer, "Current number of connections: %u/%u", NumConnections(), CONFIG_BT_MAX_CONN); - ChipDeviceEvent disconnectEvent; disconnectEvent.Type = DeviceEventType::kCHIPoBLEConnectionClosed; ReturnErrorOnFailure(PlatformMgr().PostEvent(&disconnectEvent)); @@ -485,7 +612,7 @@ CHIP_ERROR BLEManagerImpl::HandleTXCharCCCDWrite(const ChipDeviceEvent * event) if (writeEvent->Value == BT_GATT_CCC_INDICATE && SetSubscribed(writeEvent->BtConn)) { // Alert the BLE layer that CHIPoBLE "subscribe" has been received and increment the bt_conn reference counter. - HandleSubscribeReceived(writeEvent->BtConn, &CHIP_BLE_SVC_ID, &chipUUID_CHIPoBLEChar_TX); + HandleSubscribeReceived(writeEvent->BtConn, &CHIP_BLE_SVC_ID, &Ble::CHIP_BLE_CHAR_2_UUID); ChipLogProgress(DeviceLayer, "CHIPoBLE connection established (ConnId: 0x%02x, GATT MTU: %u)", bt_conn_index(writeEvent->BtConn), GetMTU(writeEvent->BtConn)); @@ -501,7 +628,7 @@ CHIP_ERROR BLEManagerImpl::HandleTXCharCCCDWrite(const ChipDeviceEvent * event) { if (UnsetSubscribed(writeEvent->BtConn)) { - HandleUnsubscribeReceived(writeEvent->BtConn, &CHIP_BLE_SVC_ID, &chipUUID_CHIPoBLEChar_TX); + HandleUnsubscribeReceived(writeEvent->BtConn, &CHIP_BLE_SVC_ID, &Ble::CHIP_BLE_CHAR_2_UUID); } } @@ -517,7 +644,7 @@ CHIP_ERROR BLEManagerImpl::HandleRXCharWrite(const ChipDeviceEvent * event) ChipLogDetail(DeviceLayer, "Write request received for CHIPoBLE RX characteristic (ConnId 0x%02x)", bt_conn_index(c1WriteEvent->BtConn)); - HandleWriteReceived(c1WriteEvent->BtConn, &CHIP_BLE_SVC_ID, &chipUUID_CHIPoBLEChar_RX, + HandleWriteReceived(c1WriteEvent->BtConn, &CHIP_BLE_SVC_ID, &Ble::CHIP_BLE_CHAR_1_UUID, PacketBufferHandle::Adopt(c1WriteEvent->Data)); bt_conn_unref(c1WriteEvent->BtConn); @@ -532,7 +659,7 @@ CHIP_ERROR BLEManagerImpl::HandleTXCharComplete(const ChipDeviceEvent * event) bt_conn_index(c2IndDoneEvent->BtConn), c2IndDoneEvent->Result); // Signal the BLE Layer that the outstanding indication is complete. - HandleIndicationConfirmation(c2IndDoneEvent->BtConn, &CHIP_BLE_SVC_ID, &chipUUID_CHIPoBLEChar_TX); + HandleIndicationConfirmation(c2IndDoneEvent->BtConn, &CHIP_BLE_SVC_ID, &Ble::CHIP_BLE_CHAR_2_UUID); bt_conn_unref(c2IndDoneEvent->BtConn); return CHIP_NO_ERROR; @@ -570,12 +697,18 @@ CHIP_ERROR BLEManagerImpl::PrepareC3CharData() } #endif -void BLEManagerImpl::HandleBLEAdvertisementIntervalChange(System::Layer * layer, void * param) +void BLEManagerImpl::HandleSlowBLEAdvertisementInterval(System::Layer * layer, void * param) { BLEMgr().SetAdvertisingMode(BLEAdvertisingMode::kSlowAdvertising); ChipLogProgress(DeviceLayer, "CHIPoBLE advertising mode changed to slow"); } +void BLEManagerImpl::HandleExtendedBLEAdvertisementInterval(System::Layer * layer, void * param) +{ + BLEMgr().SetAdvertisingMode(BLEAdvertisingMode::kExtendedAdvertising); + ChipLogProgress(DeviceLayer, "CHIPoBLE advertising mode changed to extended"); +} + void BLEManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -616,14 +749,13 @@ void BLEManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) uint16_t BLEManagerImpl::_NumConnections(void) { - return mGAPConns; + return mMatterConnNum; } CHIP_ERROR BLEManagerImpl::CloseConnection(BLE_CONNECTION_OBJECT conId) { ChipLogProgress(DeviceLayer, "Closing BLE GATT connection (ConnId %02x)", bt_conn_index(conId)); - int status = bt_conn_disconnect(conId, BT_HCI_ERR_REMOTE_USER_TERM_CONN); - return (status == 0) ? CHIP_NO_ERROR : MapErrorZephyr(status); + return MapErrorZephyr(bt_conn_disconnect(conId, BT_HCI_ERR_REMOTE_USER_TERM_CONN)); } uint16_t BLEManagerImpl::GetMTU(BLE_CONNECTION_OBJECT conId) const @@ -662,7 +794,8 @@ CHIP_ERROR BLEManagerImpl::SendIndication(BLE_CONNECTION_OBJECT conId, const Chi params->attr = &sChipoBleAttributes[kCHIPoBLE_CCC_AttributeIndex]; params->func = HandleTXIndicated; params->data = pBuf->Start(); - params->len = pBuf->DataLength(); + VerifyOrExit(CanCastTo(pBuf->DataLength()), err = CHIP_ERROR_MESSAGE_TOO_LONG); + params->len = static_cast(pBuf->DataLength()); status = bt_gatt_indicate(conId, params); VerifyOrExit(status == 0, err = MapErrorZephyr(status)); @@ -775,9 +908,16 @@ void BLEManagerImpl::HandleTXIndicated(struct bt_conn * conId, bt_gatt_indicate_ void BLEManagerImpl::HandleConnect(struct bt_conn * conId, uint8_t err) { ChipDeviceEvent event; + bt_conn_info bt_info; PlatformMgr().LockChipStack(); + sInstance.mTotalConnNum++; + ChipLogProgress(DeviceLayer, "Current number of connections: %u/%u", sInstance.mTotalConnNum, CONFIG_BT_MAX_CONN); + + VerifyOrExit(bt_conn_get_info(conId, &bt_info) == 0, ); + // Drop all callbacks incoming for the role other than peripheral, required by the Matter accessory + VerifyOrExit(bt_info.role == BT_CONN_ROLE_PERIPHERAL, ); // Don't handle BLE connecting events when it is not related to CHIPoBLE VerifyOrExit(sInstance.mFlags.Has(Flags::kChipoBleGattServiceRegister), ); @@ -794,9 +934,20 @@ void BLEManagerImpl::HandleConnect(struct bt_conn * conId, uint8_t err) void BLEManagerImpl::HandleDisconnect(struct bt_conn * conId, uint8_t reason) { ChipDeviceEvent event; + bt_conn_info bt_info; PlatformMgr().LockChipStack(); + if (sInstance.mTotalConnNum > 0) + { + sInstance.mTotalConnNum--; + } + + ChipLogProgress(DeviceLayer, "Current number of connections: %u/%u", sInstance.mTotalConnNum, CONFIG_BT_MAX_CONN); + + VerifyOrExit(bt_conn_get_info(conId, &bt_info) == 0, ); + // Drop all callbacks incoming for the role other than peripheral, required by the Matter accessory + VerifyOrExit(bt_info.role == BT_CONN_ROLE_PERIPHERAL, ); // Don't handle BLE disconnecting events when it is not related to CHIPoBLE VerifyOrExit(sInstance.mFlags.Has(Flags::kChipoBleGattServiceRegister), ); @@ -821,8 +972,21 @@ ssize_t BLEManagerImpl::HandleC3Read(struct bt_conn * conId, const struct bt_gat return 0; } + // For BLE, the max payload size is limited to UINT16_MAX since the length + // field is 2 bytes long. So, the cast to uint16_t should be fine. return bt_gatt_attr_read(conId, attr, buf, len, offset, sInstance.c3CharDataBufferHandle->Start(), - sInstance.c3CharDataBufferHandle->DataLength()); + static_cast(sInstance.c3CharDataBufferHandle->DataLength())); +} +#endif + +#ifdef CONFIG_CHIP_CUSTOM_BLE_ADV_DATA +void BLEManagerImpl::SetCustomAdvertising(Span CustomAdvertising) +{ + mCustomAdvertising = CustomAdvertising; +} +void BLEManagerImpl::SetCustomScanResponse(Span CustomScanResponse) +{ + mCustomScanResponse = CustomScanResponse; } #endif diff --git a/src/platform/nxp/common/ble_zephyr/BLEManagerImpl.h b/src/platform/nxp/common/ble_zephyr/BLEManagerImpl.h index 4ae142b65cb6c0..db00009a938cea 100644 --- a/src/platform/nxp/common/ble_zephyr/BLEManagerImpl.h +++ b/src/platform/nxp/common/ble_zephyr/BLEManagerImpl.h @@ -92,12 +92,13 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla kAdvertisingRefreshNeeded = 0x0010, /**< The advertising state/configuration has changed, but the SoftDevice has yet to be updated. */ kChipoBleGattServiceRegister = 0x0020, /**< The system has currently CHIPoBLE GATT service registered. */ + kExtendedAdvertisingEnabled = 0x0040, /**< The application has enabled extended advertising. */ }; struct ServiceData; BitFlags mFlags; - uint16_t mGAPConns; + uint16_t mMatterConnNum; CHIPoBLEServiceMode mServiceMode; bool mSubscribedConns[CONFIG_BT_MAX_CONN]; bt_gatt_indicate_params mIndicateParams[CONFIG_BT_MAX_CONN]; @@ -106,6 +107,12 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla #if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING PacketBufferHandle c3CharDataBufferHandle; #endif + // The summarized number of Bluetooth LE connections related to the device (including these not related to Matter service). + uint16_t mTotalConnNum; +#ifdef CONFIG_CHIP_CUSTOM_BLE_ADV_DATA + Span mCustomAdvertising = {}; + Span mCustomScanResponse = {}; +#endif void DriveBLEState(void); CHIP_ERROR PrepareAdvertisingRequest(); @@ -123,6 +130,8 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla bool SetSubscribed(bt_conn * conn); bool UnsetSubscribed(bt_conn * conn); uint32_t GetAdvertisingInterval(); + CHIP_ERROR RegisterGattService(); + CHIP_ERROR UnregisterGattService(); static void DriveBLEState(intptr_t arg); @@ -130,7 +139,8 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla static void HandleTXIndicated(bt_conn * conn, bt_gatt_indicate_params * attr, uint8_t err); static void HandleConnect(bt_conn * conn, uint8_t err); static void HandleDisconnect(bt_conn * conn, uint8_t reason); - static void HandleBLEAdvertisementIntervalChange(System::Layer * layer, void * param); + static void HandleSlowBLEAdvertisementInterval(System::Layer * layer, void * param); + static void HandleExtendedBLEAdvertisementInterval(System::Layer * layer, void * param); // ===== Members for internal use by the following friends. @@ -148,6 +158,10 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla #if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING static ssize_t HandleC3Read(struct bt_conn * conn, const struct bt_gatt_attr * attr, void * buf, uint16_t len, uint16_t offset); #endif +#ifdef CONFIG_CHIP_CUSTOM_BLE_ADV_DATA + void SetCustomAdvertising(Span CustomAdvertising); + void SetCustomScanResponse(Span CustomScanResponse); +#endif }; /** diff --git a/third_party/nxp/nxp_matter_support b/third_party/nxp/nxp_matter_support index 7323d61dfc746a..2fff7067131f13 160000 --- a/third_party/nxp/nxp_matter_support +++ b/third_party/nxp/nxp_matter_support @@ -1 +1 @@ -Subproject commit 7323d61dfc746aff677cb40c17cfed9d43dd9c1d +Subproject commit 2fff7067131f130c560de9fa49f247022270ca55 From 293f65eb6bfcf7c8fd9ca1e52f38d99ce3fb9200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Tue, 17 Dec 2024 15:21:22 +0100 Subject: [PATCH 59/72] [Chef] Add heat pump device type (#36457) * Create rootnode_heatpump_87ivjRAECh.zap * Create rootnode_heatpump_87ivjRAECh.matter * Update matter_device_types.json Add HeatPump device type * Update rootnode_heatpump_87ivjRAECh.zap Add new lines * Update rootnode_heatpump_87ivjRAECh.matter Add new lines * Update rootnode_heatpump_87ivjRAECh.zap PowerSource Feature = WIRED * Update rootnode_heatpump_87ivjRAECh.matter * Update rootnode_heatpump_87ivjRAECh.zap Add Device Energy Management in EP1 * Add Device Energy Management in EP1 * Add Diagnostic Logs to fix CI error * Update rootnode_heatpump_87ivjRAECh.matter cluster DiagnosticLogs * Enable TagList in EP1 * Add tagList in EP1 --- .../rootnode_heatpump_87ivjRAECh.matter | 2759 +++++++++++ .../devices/rootnode_heatpump_87ivjRAECh.zap | 4387 +++++++++++++++++ .../sample_app_util/matter_device_types.json | 3 +- 3 files changed, 7148 insertions(+), 1 deletion(-) create mode 100644 examples/chef/devices/rootnode_heatpump_87ivjRAECh.matter create mode 100644 examples/chef/devices/rootnode_heatpump_87ivjRAECh.zap diff --git a/examples/chef/devices/rootnode_heatpump_87ivjRAECh.matter b/examples/chef/devices/rootnode_heatpump_87ivjRAECh.matter new file mode 100644 index 00000000000000..87ff9a38821291 --- /dev/null +++ b/examples/chef/devices/rootnode_heatpump_87ivjRAECh.matter @@ -0,0 +1,2759 @@ +// 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; +} + +/** 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 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; +} + +/** An interface for configuring and controlling the functionality of a thermostat. */ +cluster Thermostat = 513 { + revision 7; + + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; + } + + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; + } + + enum ControlSequenceOfOperationEnum : enum8 { + kCoolingOnly = 0; + kCoolingWithReheat = 1; + kHeatingOnly = 2; + kHeatingWithReheat = 3; + kCoolingAndHeating = 4; + kCoolingAndHeatingWithReheat = 5; + } + + enum PresetScenarioEnum : enum8 { + kOccupied = 1; + kUnoccupied = 2; + kSleep = 3; + kWake = 4; + kVacation = 5; + kGoingToSleep = 6; + kUserDefined = 254; + } + + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; + } + + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; + } + + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { + kOff = 0; + kAuto = 1; + kCool = 3; + kHeat = 4; + kEmergencyHeat = 5; + kPrecooling = 6; + kFanOnly = 7; + kDry = 8; + kSleep = 9; + } + + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; + } + + bitmap Feature : bitmap32 { + kHeating = 0x1; + kCooling = 0x2; + kOccupancy = 0x4; + kScheduleConfiguration = 0x8; + kSetback = 0x10; + kAutoMode = 0x20; + kLocalTemperatureNotExposed = 0x40; + kMatterScheduleConfiguration = 0x80; + kPresets = 0x100; + } + + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap OccupancyBitmap : bitmap8 { + kOccupied = 0x1; + } + + bitmap PresetTypeFeaturesBitmap : bitmap16 { + kAutomatic = 0x1; + kSupportsNames = 0x2; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { + kHeatSetpointPresent = 0x1; + kCoolSetpointPresent = 0x2; + } + + bitmap ScheduleTypeFeaturesBitmap : bitmap16 { + kSupportsPresets = 0x1; + kSupportsSetpoints = 0x2; + kSupportsNames = 0x4; + kSupportsOff = 0x8; + } + + struct ScheduleTransitionStruct { + ScheduleDayOfWeekBitmap dayOfWeek = 0; + int16u transitionTime = 1; + optional octet_string<16> presetHandle = 2; + optional SystemModeEnum systemMode = 3; + optional temperature coolingSetpoint = 4; + optional temperature heatingSetpoint = 5; + } + + struct ScheduleStruct { + nullable octet_string<16> scheduleHandle = 0; + SystemModeEnum systemMode = 1; + optional char_string<64> name = 2; + optional octet_string<16> presetHandle = 3; + ScheduleTransitionStruct transitions[] = 4; + nullable boolean builtIn = 5; + } + + struct PresetStruct { + nullable octet_string<16> presetHandle = 0; + PresetScenarioEnum presetScenario = 1; + optional nullable char_string<64> name = 2; + optional temperature coolingSetpoint = 3; + optional temperature heatingSetpoint = 4; + nullable boolean builtIn = 5; + } + + struct PresetTypeStruct { + PresetScenarioEnum presetScenario = 0; + int8u numberOfPresets = 1; + PresetTypeFeaturesBitmap presetTypeFeatures = 2; + } + + struct ScheduleTypeStruct { + SystemModeEnum systemMode = 0; + int8u numberOfSchedules = 1; + ScheduleTypeFeaturesBitmap scheduleTypeFeatures = 2; + } + + struct WeeklyScheduleTransitionStruct { + int16u transitionTime = 0; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; + } + + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; + readonly attribute optional OccupancyBitmap occupancy = 2; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; + readonly attribute optional int8u PICoolingDemand = 7; + readonly attribute optional int8u PIHeatingDemand = 8; + attribute access(write: manage) optional HVACSystemTypeBitmap HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional int8s localTemperatureCalibration = 16; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int8s minSetpointDeadBand = 25; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; + readonly attribute optional int8u numberOfWeeklyTransitions = 33; + readonly attribute optional int8u numberOfDailyTransitions = 34; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; + attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; + readonly attribute optional nullable int16s setpointChangeAmount = 49; + readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; + attribute access(write: manage) optional nullable int8u occupiedSetback = 52; + readonly attribute optional nullable int8u occupiedSetbackMin = 53; + readonly attribute optional nullable int8u occupiedSetbackMax = 54; + attribute access(write: manage) optional nullable int8u unoccupiedSetback = 55; + readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; + readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; + attribute access(write: manage) optional int8u emergencyHeatDelta = 58; + attribute access(write: manage) optional ACTypeEnum ACType = 64; + attribute access(write: manage) optional int16u ACCapacity = 65; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; + readonly attribute optional PresetTypeStruct presetTypes[] = 72; + readonly attribute optional ScheduleTypeStruct scheduleTypes[] = 73; + readonly attribute optional int8u numberOfPresets = 74; + readonly attribute optional int8u numberOfSchedules = 75; + readonly attribute optional int8u numberOfScheduleTransitions = 76; + readonly attribute optional nullable int8u numberOfScheduleTransitionPerDay = 77; + readonly attribute optional nullable octet_string<16> activePresetHandle = 78; + readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; + attribute access(write: manage) optional PresetStruct presets[] = 80; + attribute access(write: manage) optional ScheduleStruct schedules[] = 81; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 82; + 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 SetpointRaiseLowerRequest { + SetpointRaiseLowerModeEnum mode = 0; + int8s amount = 1; + } + + response struct GetWeeklyScheduleResponse = 0 { + int8u numberOfTransitionsForSequence = 0; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; + } + + request struct SetWeeklyScheduleRequest { + int8u numberOfTransitionsForSequence = 0; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; + } + + request struct GetWeeklyScheduleRequest { + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; + } + + request struct SetActiveScheduleRequestRequest { + octet_string<16> scheduleHandle = 0; + } + + request struct SetActivePresetRequestRequest { + nullable octet_string<16> presetHandle = 0; + } + + response struct AtomicResponse = 253 { + status statusCode = 0; + AtomicAttributeStatusStruct attributeStatus[] = 1; + optional int16u timeout = 2; + } + + request struct AtomicRequestRequest { + AtomicRequestTypeEnum requestType = 0; + attrib_id attributeRequests[] = 1; + optional int16u timeout = 2; + } + + /** Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. */ + command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; + /** This command is used to update the thermostat weekly setpoint schedule from a management system. */ + command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; + /** The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. */ + command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; + /** This command is used to clear the weekly schedule. */ + command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. */ + command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; + /** ID */ + command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; + /** Begins, Commits or Cancels an atomic write */ + command access(invoke: manage) AtomicRequest(AtomicRequestRequest): AtomicResponse = 254; +} + +/** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ +cluster TemperatureMeasurement = 1026 { + revision 1; // NOTE: Default/not specifically set + + readonly attribute nullable temperature measuredValue = 0; + readonly attribute nullable temperature minMeasuredValue = 1; + readonly attribute nullable temperature maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 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 { + 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 { + callback attribute dataModelRevision; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + ram attribute nodeLabel; + callback attribute location; + callback attribute hardwareVersion; + callback attribute hardwareVersionString; + callback attribute softwareVersion; + callback attribute softwareVersionString; + 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 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; + 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 interfaceEnabled; + ram attribute lastNetworkingStatus; + ram attribute lastNetworkID; + ram attribute lastConnectErrorValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster DiagnosticLogs { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command RetrieveLogsRequest; + handle command RetrieveLogsResponse; + } + + server cluster GeneralDiagnostics { + callback attribute networkInterfaces; + callback attribute rebootCount; + callback attribute upTime; + ram attribute testEventTriggersEnabled; + 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 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 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_powersource = 17, version 1; + device type ma_electricalsensor = 1296, version 1; + device type device_energy_management = 1293, version 1; + device type ma_heatpump = 777, version 1; + + binding cluster Thermostat; + + 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; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute tagList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster PowerSource { + ram attribute status; + ram attribute order; + ram attribute description; + callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 1; + } + + server cluster ElectricalPowerMeasurement { + callback attribute powerMode; + callback attribute numberOfMeasurementTypes; + callback attribute accuracy; + callback attribute voltage; + callback attribute activeCurrent; + callback attribute activePower; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster ElectricalEnergyMeasurement { + callback attribute accuracy; + callback attribute cumulativeEnergyImported; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster DeviceEnergyManagement { + callback attribute ESAType; + callback attribute ESACanGenerate; + callback attribute ESAState; + callback attribute absMinPower; + callback attribute absMaxPower; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 4; + } + + server cluster PowerTopology { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + } + + 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 = 2; + + handle command ChangeToMode; + handle command ChangeToModeResponse; + } +} +endpoint 2 { + device type ma_tempsensor = 770, 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 TemperatureMeasurement { + ram attribute measuredValue default = 6000; + ram attribute minMeasuredValue default = 0; + ram attribute maxMeasuredValue default = 90; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} +endpoint 3 { + device type ma_tempsensor = 770, 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 TemperatureMeasurement { + ram attribute measuredValue default = 4000; + ram attribute minMeasuredValue default = 0; + ram attribute maxMeasuredValue default = 90; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} + + diff --git a/examples/chef/devices/rootnode_heatpump_87ivjRAECh.zap b/examples/chef/devices/rootnode_heatpump_87ivjRAECh.zap new file mode 100644 index 00000000000000..e05f413a910b46 --- /dev/null +++ b/examples/chef/devices/rootnode_heatpump_87ivjRAECh.zap @@ -0,0 +1,4387 @@ +{ + "fileFormat": 2, + "featureLevel": 104, + "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 + } + ] + }, + { + "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": 1, + "maxInterval": 65534, + "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": 1, + "maxInterval": 65534, + "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": 1, + "maxInterval": 65534, + "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": 1, + "maxInterval": 65534, + "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": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "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": 1, + "maxInterval": 65534, + "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": 1, + "maxInterval": 65534, + "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": 1, + "maxInterval": 65534, + "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": 1, + "maxInterval": 65534, + "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": 1, + "maxInterval": 65534, + "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": 1, + "maxInterval": 65534, + "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": "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": 1, + "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": 1, + "maxInterval": 65534, + "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": "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": "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": 1, + "maxInterval": 65534, + "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": 1, + "maxInterval": 65534, + "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": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 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": "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": "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": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshot", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshotResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "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": 1, + "maxInterval": 65534, + "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": "TestEventTriggersEnabled", + "code": 8, + "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": "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": "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": 1, + "maxInterval": 65534, + "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": 1, + "maxInterval": 65534, + "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": 1, + "maxInterval": 65534, + "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": 1, + "maxInterval": 65534, + "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": 1, + "maxInterval": 65534, + "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": 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, + "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": 777, + "profileId": 259, + "label": "MA-heatpump", + "name": "MA-heatpump", + "deviceTypeOrder": 0 + }, + "deviceTypes": [ + { + "code": 777, + "profileId": 259, + "label": "MA-heatpump", + "name": "MA-heatpump", + "deviceTypeOrder": 0 + }, + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource", + "deviceTypeOrder": 1 + }, + { + "code": 1296, + "profileId": 259, + "label": "MA-electricalsensor", + "name": "MA-electricalsensor", + "deviceTypeOrder": 2 + }, + { + "code": 1293, + "profileId": 259, + "label": "Device Energy Management", + "name": "Device Energy Management", + "deviceTypeOrder": 3 + } + ], + "deviceVersions": [ + 1, + 1, + 1, + 1 + ], + "deviceIdentifiers": [ + 777, + 17, + 1296, + 1293 + ], + "deviceTypeName": "MA-heatpump", + "deviceTypeCode": 777, + "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 + } + ], + "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": "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": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "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": "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": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Description", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "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": "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": "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": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "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": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "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", + "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": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Power Topology", + "code": 156, + "mfgCode": null, + "define": "POWER_TOPOLOGY_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": "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 + } + ] + }, + { + "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": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat", + "code": 513, + "mfgCode": null, + "define": "THERMOSTAT_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "SetpointRaiseLower", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + } + ] + } + ] + }, + { + "id": 3, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 770, + "profileId": 259, + "label": "MA-tempsensor", + "name": "MA-tempsensor", + "deviceTypeOrder": 0 + }, + "deviceTypes": [ + { + "code": 770, + "profileId": 259, + "label": "MA-tempsensor", + "name": "MA-tempsensor", + "deviceTypeOrder": 0 + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 770 + ], + "deviceTypeName": "MA-tempsensor", + "deviceTypeCode": 770, + "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": "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": "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 Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "6000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "90", + "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 + } + ] + } + ] + }, + { + "id": 4, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 770, + "profileId": 259, + "label": "MA-tempsensor", + "name": "MA-tempsensor", + "deviceTypeOrder": 0 + }, + "deviceTypes": [ + { + "code": 770, + "profileId": 259, + "label": "MA-tempsensor", + "name": "MA-tempsensor", + "deviceTypeOrder": 0 + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 770 + ], + "deviceTypeName": "MA-tempsensor", + "deviceTypeCode": 770, + "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": "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": "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 Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "90", + "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 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": null, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "parentEndpointIdentifier": 0 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 2, + "profileId": 259, + "endpointId": 2, + "networkId": 0, + "parentEndpointIdentifier": 0 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 3, + "profileId": 259, + "endpointId": 3, + "networkId": 0, + "parentEndpointIdentifier": null + } + ] +} + + diff --git a/examples/chef/sample_app_util/matter_device_types.json b/examples/chef/sample_app_util/matter_device_types.json index 3390dec8a584d7..60e307f0dcf70a 100644 --- a/examples/chef/sample_app_util/matter_device_types.json +++ b/examples/chef/sample_app_util/matter_device_types.json @@ -51,5 +51,6 @@ "Dishwasher": 117, "Smoke CO Alarm": 118, "Water Valve": 66, - "Water Leak Detector": 67 + "Water Leak Detector": 67, + "HeatPump": 777 } From b9d69a2c174ad384cfa588cb2c3f9fa5a2ccebfb Mon Sep 17 00:00:00 2001 From: C Freeman Date: Tue, 17 Dec 2024 12:51:47 -0500 Subject: [PATCH 60/72] Scenes management: Fix access on CopyScene (#36865) --- .../all-clusters-common/all-clusters-app.matter | 2 +- .../all-clusters-common/all-clusters-minimal-app.matter | 2 +- .../chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter | 2 +- .../light-switch-common/icd-lit-light-switch-app.matter | 2 +- .../light-switch-common/light-switch-app.matter | 2 +- examples/light-switch-app/qpg/zap/switch.matter | 2 +- .../lighting-common/lighting-app.matter | 2 +- examples/lighting-app/lighting-common/lighting-app.matter | 2 +- .../lighting-app/silabs/data_model/lighting-thread-app.matter | 2 +- .../lighting-app/silabs/data_model/lighting-wifi-app.matter | 2 +- examples/placeholder/linux/apps/app1/config.matter | 2 +- examples/placeholder/linux/apps/app2/config.matter | 2 +- .../virtual-device-common/virtual-device-app.matter | 2 +- .../zap/tests/outputs/all-clusters-app/app-templates/access.h | 3 +++ .../zap/tests/outputs/lighting-app/app-templates/access.h | 3 +++ src/app/zap-templates/zcl/data-model/chip/scene.xml | 1 + src/controller/data_model/controller-clusters.matter | 2 +- 17 files changed, 21 insertions(+), 14 deletions(-) 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 071a3fcf7c5b76..fc877675127909 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 @@ -4010,7 +4010,7 @@ provisional cluster ScenesManagement = 98 { /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64; + fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64; } /** Attributes and commands for monitoring HEPA filters in a device */ 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 ae50904721e813..c3fac02bab41a7 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 @@ -2879,7 +2879,7 @@ provisional cluster ScenesManagement = 98 { /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64; + fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64; } /** An interface to a generic way to secure a door */ diff --git a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter index cc875bbd196bf7..aabfbccc2d0a90 100644 --- a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter +++ b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter @@ -1908,7 +1908,7 @@ provisional cluster ScenesManagement = 98 { /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64; + fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64; } /** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */ diff --git a/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.matter b/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.matter index 67ed0ab5715709..a3e73a8cd0b348 100644 --- a/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.matter @@ -2438,7 +2438,7 @@ provisional cluster ScenesManagement = 98 { /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64; + fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64; } /** Attributes and commands for controlling the color properties of a color-capable light. */ 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 07910e283f3a0a..f3410b59dfa0a8 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 @@ -2438,7 +2438,7 @@ provisional cluster ScenesManagement = 98 { /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64; + fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64; } /** Attributes and commands for controlling the color properties of a color-capable light. */ diff --git a/examples/light-switch-app/qpg/zap/switch.matter b/examples/light-switch-app/qpg/zap/switch.matter index 03e0f51ad0830d..dcf118163d8ec4 100644 --- a/examples/light-switch-app/qpg/zap/switch.matter +++ b/examples/light-switch-app/qpg/zap/switch.matter @@ -2555,7 +2555,7 @@ provisional cluster ScenesManagement = 98 { /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64; + fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64; } /** Attributes and commands for controlling the color properties of a color-capable light. */ 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 e8e99173b85a17..431011ab0c9859 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 @@ -2246,7 +2246,7 @@ provisional cluster ScenesManagement = 98 { /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64; + fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64; } /** Attributes and commands for controlling the color properties of a color-capable light. */ diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 769d929e580836..80db43eedb8548 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -2246,7 +2246,7 @@ provisional cluster ScenesManagement = 98 { /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64; + fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64; } /** Attributes and commands for controlling the color properties of a color-capable light. */ 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 9fb02976f031d5..3c8202d4392460 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -1950,7 +1950,7 @@ provisional cluster ScenesManagement = 98 { /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64; + fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64; } /** Attributes and commands for controlling the color properties of a color-capable light. */ 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 1619fc9622caf4..16f4d7247f44ac 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -2241,7 +2241,7 @@ provisional cluster ScenesManagement = 98 { /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64; + fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64; } /** Attributes and commands for controlling the color properties of a color-capable light. */ diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index fe5fe0bfe6d84b..9daced64e142bd 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -3514,7 +3514,7 @@ provisional cluster ScenesManagement = 98 { /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64; + fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64; } /** An interface to a generic way to secure a door */ diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 68de2f9ffba90e..e81c96d55c248c 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -3471,7 +3471,7 @@ provisional cluster ScenesManagement = 98 { /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64; + fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64; } /** An interface to a generic way to secure a door */ 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 b9a3224db7f109..1ae60c5b6c6c25 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 @@ -2354,7 +2354,7 @@ provisional cluster ScenesManagement = 98 { /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64; + fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64; } /** An interface to a generic way to secure a door */ diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h index 9b35ecb22d178c..cea3c62600180c 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h @@ -400,6 +400,7 @@ 0x00000062, /* Cluster: Scenes Management, Command: RemoveScene, Privilege: manage */ \ 0x00000062, /* Cluster: Scenes Management, Command: RemoveAllScenes, Privilege: manage */ \ 0x00000062, /* Cluster: Scenes Management, Command: StoreScene, Privilege: manage */ \ + 0x00000062, /* Cluster: Scenes Management, Command: CopyScene, Privilege: manage */ \ 0x00000201, /* Cluster: Thermostat, Command: AtomicRequest, Privilege: manage */ \ 0xFFF1FC06, /* Cluster: Fault Injection, Command: FailAtFault, Privilege: manage */ \ 0xFFF1FC06, /* Cluster: Fault Injection, Command: FailRandomlyAtFault, Privilege: manage */ \ @@ -450,6 +451,7 @@ 0x00000002, /* Cluster: Scenes Management, Command: RemoveScene, Privilege: manage */ \ 0x00000003, /* Cluster: Scenes Management, Command: RemoveAllScenes, Privilege: manage */ \ 0x00000004, /* Cluster: Scenes Management, Command: StoreScene, Privilege: manage */ \ + 0x00000040, /* Cluster: Scenes Management, Command: CopyScene, Privilege: manage */ \ 0x000000FE, /* Cluster: Thermostat, Command: AtomicRequest, Privilege: manage */ \ 0x00000000, /* Cluster: Fault Injection, Command: FailAtFault, Privilege: manage */ \ 0x00000001, /* Cluster: Fault Injection, Command: FailRandomlyAtFault, Privilege: manage */ \ @@ -500,6 +502,7 @@ chip::Access::Privilege::kManage, /* Cluster: Scenes Management, Command: RemoveScene, Privilege: manage */ \ chip::Access::Privilege::kManage, /* Cluster: Scenes Management, Command: RemoveAllScenes, Privilege: manage */ \ chip::Access::Privilege::kManage, /* Cluster: Scenes Management, Command: StoreScene, Privilege: manage */ \ + chip::Access::Privilege::kManage, /* Cluster: Scenes Management, Command: CopyScene, Privilege: manage */ \ chip::Access::Privilege::kManage, /* Cluster: Thermostat, Command: AtomicRequest, Privilege: manage */ \ chip::Access::Privilege::kManage, /* Cluster: Fault Injection, Command: FailAtFault, Privilege: manage */ \ chip::Access::Privilege::kManage, /* Cluster: Fault Injection, Command: FailRandomlyAtFault, Privilege: manage */ \ diff --git a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/access.h b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/access.h index acef1673384c14..c062b9376f4666 100644 --- a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/access.h +++ b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/access.h @@ -200,6 +200,7 @@ 0x00000062, /* Cluster: Scenes Management, Command: RemoveScene, Privilege: manage */ \ 0x00000062, /* Cluster: Scenes Management, Command: RemoveAllScenes, Privilege: manage */ \ 0x00000062, /* Cluster: Scenes Management, Command: StoreScene, Privilege: manage */ \ + 0x00000062, /* Cluster: Scenes Management, Command: CopyScene, Privilege: manage */ \ } // Parallel array data (cluster, *command*, privilege) for invoke command @@ -242,6 +243,7 @@ 0x00000002, /* Cluster: Scenes Management, Command: RemoveScene, Privilege: manage */ \ 0x00000003, /* Cluster: Scenes Management, Command: RemoveAllScenes, Privilege: manage */ \ 0x00000004, /* Cluster: Scenes Management, Command: StoreScene, Privilege: manage */ \ + 0x00000040, /* Cluster: Scenes Management, Command: CopyScene, Privilege: manage */ \ } // Parallel array data (cluster, command, *privilege*) for invoke command @@ -284,6 +286,7 @@ chip::Access::Privilege::kManage, /* Cluster: Scenes Management, Command: RemoveScene, Privilege: manage */ \ chip::Access::Privilege::kManage, /* Cluster: Scenes Management, Command: RemoveAllScenes, Privilege: manage */ \ chip::Access::Privilege::kManage, /* Cluster: Scenes Management, Command: StoreScene, Privilege: manage */ \ + chip::Access::Privilege::kManage, /* Cluster: Scenes Management, Command: CopyScene, Privilege: manage */ \ } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/app/zap-templates/zcl/data-model/chip/scene.xml b/src/app/zap-templates/zcl/data-model/chip/scene.xml index ceea35e3759e69..fdd4a65c9cb29c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/scene.xml +++ b/src/app/zap-templates/zcl/data-model/chip/scene.xml @@ -169,6 +169,7 @@ limitations under the License. + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 31da395b05cd31..35b85ec5ffbd77 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -4272,7 +4272,7 @@ provisional cluster ScenesManagement = 98 { /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64; + fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64; } /** Attributes and commands for monitoring HEPA filters in a device */ From d0ec3a716c69a25f25690239cfc16c46c802ef51 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Tue, 17 Dec 2024 12:52:27 -0500 Subject: [PATCH 61/72] General diagnostics: Fix access on PayloadTestRequest (#36864) --- .../air-purifier-common/air-purifier-app.matter | 2 +- .../air-quality-sensor-common/air-quality-sensor-app.matter | 2 +- .../all-clusters-common/all-clusters-app.matter | 2 +- .../all-clusters-common/all-clusters-minimal-app.matter | 2 +- examples/bridge-app/bridge-common/bridge-app.matter | 2 +- .../devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter | 2 +- examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter | 2 +- ...eraturesensor_humiditysensor_thermostat_56de3d5f45.matter | 2 +- .../chef/devices/rootnode_airqualitysensor_e63187f6c9.matter | 2 +- .../chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter | 2 +- .../devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter | 2 +- .../chef/devices/rootnode_contactsensor_27f76aeaf5.matter | 2 +- .../chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter | 2 +- ...ditysensor_airqualitysensor_powersource_367e7cea91.matter | 2 +- .../chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter | 2 +- .../devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter | 2 +- examples/chef/devices/rootnode_dishwasher_cc105034fe.matter | 2 +- examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter | 2 +- .../devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter | 2 +- examples/chef/devices/rootnode_fan_7N2TobIlOX.matter | 2 +- examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter | 2 +- .../chef/devices/rootnode_genericswitch_2dfff6e516.matter | 2 +- .../chef/devices/rootnode_genericswitch_9866e35d0b.matter | 2 +- .../devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter | 2 +- .../chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter | 2 +- .../chef/devices/rootnode_laundrydryer_01796fe396.matter | 2 +- .../chef/devices/rootnode_laundrywasher_fb10d238c8.matter | 2 +- examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter | 2 +- .../chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter | 2 +- examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter | 2 +- examples/chef/devices/rootnode_onofflight_samplemei.matter | 2 +- .../chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter | 2 +- .../chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter | 2 +- .../chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter | 2 +- examples/chef/devices/rootnode_pump_5f904818cc.matter | 2 +- examples/chef/devices/rootnode_pump_a811bb33a0.matter | 2 +- ...ledcabinet_temperaturecontrolledcabinet_ffdb696680.matter | 2 +- .../devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter | 2 +- .../devices/rootnode_roomairconditioner_9cf3607804.matter | 2 +- .../chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter | 2 +- examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter | 2 +- .../devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter | 2 +- examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter | 2 +- .../devices/rootnode_waterleakdetector_0b067acfa3.matter | 2 +- examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter | 2 +- .../chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter | 2 +- .../contact-sensor-common/contact-sensor-app.matter | 2 +- .../contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter | 2 +- .../contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter | 2 +- .../dishwasher-app/dishwasher-common/dishwasher-app.matter | 2 +- .../silabs/data_model/dishwasher-thread-app.matter | 2 +- .../silabs/data_model/dishwasher-wifi-app.matter | 2 +- .../energy-management-common/energy-management-app.matter | 2 +- .../fabric-bridge-common/fabric-bridge-app.matter | 2 +- examples/fabric-sync/bridge/fabric-bridge.matter | 2 +- .../laundry-washer-app/nxp/zap/laundry-washer-app.matter | 2 +- .../light-switch-common/icd-lit-light-switch-app.matter | 2 +- .../light-switch-common/light-switch-app.matter | 2 +- examples/light-switch-app/qpg/zap/switch.matter | 2 +- .../lighting-common/lighting-app.matter | 2 +- .../bouffalolab/data_model/lighting-app-ethernet.matter | 2 +- .../bouffalolab/data_model/lighting-app-thread.matter | 2 +- .../bouffalolab/data_model/lighting-app-wifi.matter | 2 +- examples/lighting-app/lighting-common/lighting-app.matter | 2 +- examples/lighting-app/nxp/zap/lighting-on-off.matter | 2 +- examples/lighting-app/qpg/zap/light.matter | 2 +- .../silabs/data_model/lighting-thread-app.matter | 2 +- .../lighting-app/silabs/data_model/lighting-wifi-app.matter | 2 +- .../lit-icd-app/lit-icd-common/lit-icd-server-app.matter | 2 +- examples/lock-app/lock-common/lock-app.matter | 2 +- examples/lock-app/nxp/zap/lock-app.matter | 2 +- examples/lock-app/qpg/zap/lock.matter | 2 +- examples/lock-app/silabs/data_model/lock-app.matter | 2 +- .../microwave-oven-common/microwave-oven-app.matter | 2 +- .../network-manager-common/network-manager-app.matter | 2 +- .../ota-provider-common/ota-provider-app.matter | 2 +- .../ota-requestor-common/ota-requestor-app.matter | 2 +- examples/placeholder/linux/apps/app1/config.matter | 2 +- examples/placeholder/linux/apps/app2/config.matter | 2 +- examples/pump-app/pump-common/pump-app.matter | 2 +- examples/pump-app/silabs/data_model/pump-thread-app.matter | 2 +- examples/pump-app/silabs/data_model/pump-wifi-app.matter | 2 +- .../pump-controller-common/pump-controller-app.matter | 2 +- .../refrigerator-common/refrigerator-app.matter | 2 +- .../silabs/data_model/refrigerator-thread-app.matter | 2 +- .../silabs/data_model/refrigerator-wifi-app.matter | 2 +- examples/rvc-app/rvc-common/rvc-app.matter | 2 +- .../smoke-co-alarm-common/smoke-co-alarm-app.matter | 2 +- .../temperature-measurement.matter | 2 +- examples/thermostat/nxp/zap/thermostat_matter_br.matter | 2 +- examples/thermostat/nxp/zap/thermostat_matter_thread.matter | 2 +- examples/thermostat/nxp/zap/thermostat_matter_wifi.matter | 2 +- examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter | 2 +- examples/thermostat/thermostat-common/thermostat.matter | 2 +- examples/thread-br-app/thread-br-common/thread-br-app.matter | 2 +- examples/tv-app/tv-common/tv-app.matter | 2 +- .../tv-casting-app/tv-casting-common/tv-casting-app.matter | 2 +- .../virtual-device-common/virtual-device-app.matter | 2 +- .../water-leak-detector-app.matter | 2 +- examples/window-app/common/window-app.matter | 2 +- .../tests/outputs/all-clusters-app/app-templates/access.h | 3 +++ .../zcl/data-model/chip/general-diagnostics-cluster.xml | 5 +++-- src/controller/data_model/controller-clusters.matter | 2 +- 103 files changed, 107 insertions(+), 103 deletions(-) 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 8b8743c6b67330..be9b08eecf6c5d 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 @@ -1147,7 +1147,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ 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 896a27edd0d365..3fac5bbaeac2d1 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 @@ -1100,7 +1100,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 fc877675127909..be6f4c0622c94a 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 @@ -2050,7 +2050,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 c3fac02bab41a7..e7c61c1c308a05 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 @@ -1965,7 +1965,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 26a16622741c6c..a17e26628c0deb 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -1454,7 +1454,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 9a91b17a2a718a..931784e091f027 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1262,7 +1262,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter index dc4334462e5cd8..d3e3b7b2d5eb47 100644 --- a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter +++ b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter @@ -1219,7 +1219,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 7c5232970dfaf5..dfa25e487b78e9 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 @@ -1070,7 +1070,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ diff --git a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter index ac2265df8d50a4..aef07a846c9fd0 100644 --- a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter +++ b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter @@ -1406,7 +1406,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index f9b32f989dbce5..9d1c73090d23c3 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -1344,7 +1344,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 5f0c6496f87d65..17b103e7d38b00 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -1421,7 +1421,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter index 8c08a4e1540b5e..b28730a4017232 100644 --- a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter +++ b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter @@ -1406,7 +1406,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 1d5b5856208131..4f9bdd54889000 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -1504,7 +1504,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_contactsensor_lightsensor_occupancysensor_temperaturesensor_pressuresensor_flowsensor_humiditysensor_airqualitysensor_powersource_367e7cea91.matter b/examples/chef/devices/rootnode_contactsensor_lightsensor_occupancysensor_temperaturesensor_pressuresensor_flowsensor_humiditysensor_airqualitysensor_powersource_367e7cea91.matter index 27c88b4fb8435e..c7acde0a5c341a 100644 --- a/examples/chef/devices/rootnode_contactsensor_lightsensor_occupancysensor_temperaturesensor_pressuresensor_flowsensor_humiditysensor_airqualitysensor_powersource_367e7cea91.matter +++ b/examples/chef/devices/rootnode_contactsensor_lightsensor_occupancysensor_temperaturesensor_pressuresensor_flowsensor_humiditysensor_airqualitysensor_powersource_367e7cea91.matter @@ -1290,7 +1290,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index 57166f3ba46159..a2b13bd5ffdb72 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1442,7 +1442,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter index aabfbccc2d0a90..b2c67e9c9a4a4b 100644 --- a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter +++ b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter @@ -1442,7 +1442,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter index d730676d92ece9..9eac1825e8d0b0 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter @@ -1061,7 +1061,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) 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. */ diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 6aa16252672dcd..57ebf108fce25f 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -1406,7 +1406,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 71363c84a7d8a5..11c3186dcbfc10 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -1442,7 +1442,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 1acdbca51279a4..217d06a4e7c2c7 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -1224,7 +1224,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 466dbe2c419115..7d4b787540cbe3 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -1245,7 +1245,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter index 0ae39923c10a27..aa8846b6c64d4f 100644 --- a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter +++ b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter @@ -1252,7 +1252,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter index 6a66018ef40f60..5d79f67076a948 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter @@ -1252,7 +1252,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 36a655d47df5b6..76eac769b14b2b 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1442,7 +1442,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index e633b0f2bebc4c..a401aed997c79d 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -1245,7 +1245,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_laundrydryer_01796fe396.matter b/examples/chef/devices/rootnode_laundrydryer_01796fe396.matter index bb05b243f8283d..7960936439f774 100644 --- a/examples/chef/devices/rootnode_laundrydryer_01796fe396.matter +++ b/examples/chef/devices/rootnode_laundrydryer_01796fe396.matter @@ -1061,7 +1061,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) 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. */ diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter index 2e76d3f34a3a85..c92cf98aed3b59 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter @@ -994,7 +994,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) 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. */ diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 32528515cf121b..167fb98e36ece9 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -1245,7 +1245,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 04cf5fb646d7bb..2d35dcb2f8840d 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -1245,7 +1245,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index c4cc8357d94ef8..f91a4df653c42f 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -1442,7 +1442,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.matter b/examples/chef/devices/rootnode_onofflight_samplemei.matter index 32b351b6e81791..174f5c119469fa 100644 --- a/examples/chef/devices/rootnode_onofflight_samplemei.matter +++ b/examples/chef/devices/rootnode_onofflight_samplemei.matter @@ -1442,7 +1442,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index 81fb81958f8f5d..190a3a4edc4e86 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -1317,7 +1317,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 94414ae3165662..4da57e8e1b3686 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -1317,7 +1317,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 1bc2e8726e1083..3d493f926633f9 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -1245,7 +1245,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.matter b/examples/chef/devices/rootnode_pump_5f904818cc.matter index 8cd43edf190fd9..741dda60e307bc 100644 --- a/examples/chef/devices/rootnode_pump_5f904818cc.matter +++ b/examples/chef/devices/rootnode_pump_5f904818cc.matter @@ -1044,7 +1044,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index 5b2371526d9a59..50c2dd31633bd9 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -1044,7 +1044,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter index bfbd486f6e0d01..686d67e3fa49aa 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter @@ -922,7 +922,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) 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. */ diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index dbc56cd15e5d26..9abd9b19729f7d 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -1329,7 +1329,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index 467ad0c462767d..bb4a46da845f29 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -1142,7 +1142,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter index b7e31f0bdcbf1c..f64237210be6fc 100644 --- a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter @@ -1329,7 +1329,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index c5a1ccc522a4c3..ef250cb35245ec 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -1365,7 +1365,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 6199388887e069..e26a62dfd2f1b1 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -1245,7 +1245,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 79930324883042..549c98f930b62b 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -1306,7 +1306,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter index 1ea6c421aba885..67f17e7ab95b4c 100644 --- a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter +++ b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter @@ -1329,7 +1329,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ diff --git a/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter b/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter index 0e4ffe5dc8ee14..7105d9904673da 100644 --- a/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter +++ b/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter @@ -1269,7 +1269,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index 0f1d25c571179f..30b58d92053827 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -1245,7 +1245,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 55820ca5377f4f..fed65931ab4d49 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 @@ -1224,7 +1224,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 899dc159a0baaa..f3027e97812e05 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 @@ -1147,7 +1147,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 3c88ebe1202775..6fd0de001695a9 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 @@ -1147,7 +1147,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index 6ee107a38f063e..8e3096b7a08efc 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -1070,7 +1070,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) 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. */ diff --git a/examples/dishwasher-app/silabs/data_model/dishwasher-thread-app.matter b/examples/dishwasher-app/silabs/data_model/dishwasher-thread-app.matter index 93222a8580e5ba..87d6dca00e4391 100644 --- a/examples/dishwasher-app/silabs/data_model/dishwasher-thread-app.matter +++ b/examples/dishwasher-app/silabs/data_model/dishwasher-thread-app.matter @@ -1255,7 +1255,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/dishwasher-app/silabs/data_model/dishwasher-wifi-app.matter b/examples/dishwasher-app/silabs/data_model/dishwasher-wifi-app.matter index 24abdb39862888..e2daba3687f4fa 100644 --- a/examples/dishwasher-app/silabs/data_model/dishwasher-wifi-app.matter +++ b/examples/dishwasher-app/silabs/data_model/dishwasher-wifi-app.matter @@ -1255,7 +1255,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 bdcbe117c8344b..d7db07d6c94993 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 @@ -1292,7 +1292,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ 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 06e76db5ecee1a..2d1148bef83cd8 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 @@ -1118,7 +1118,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/fabric-sync/bridge/fabric-bridge.matter b/examples/fabric-sync/bridge/fabric-bridge.matter index 06e76db5ecee1a..2d1148bef83cd8 100644 --- a/examples/fabric-sync/bridge/fabric-bridge.matter +++ b/examples/fabric-sync/bridge/fabric-bridge.matter @@ -1118,7 +1118,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 37b7786af95b80..678ca3b0f4082f 100644 --- a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter +++ b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter @@ -1360,7 +1360,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.matter b/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.matter index a3e73a8cd0b348..2e3827d9ae2268 100644 --- a/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.matter @@ -1367,7 +1367,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 f3410b59dfa0a8..b50c93ec27d357 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 @@ -1367,7 +1367,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/light-switch-app/qpg/zap/switch.matter b/examples/light-switch-app/qpg/zap/switch.matter index dcf118163d8ec4..2eb47604f38781 100644 --- a/examples/light-switch-app/qpg/zap/switch.matter +++ b/examples/light-switch-app/qpg/zap/switch.matter @@ -1751,7 +1751,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 431011ab0c9859..4c7e31646de0fa 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 @@ -1421,7 +1421,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 7ce2b52c2db8a2..277e8bc07c66ea 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter @@ -1421,7 +1421,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 bc48c4056b2b45..e7a1fd8a68f6aa 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -1421,7 +1421,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 d896f4308f956d..94444d34e7f16b 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -1421,7 +1421,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 80db43eedb8548..53f31a35e85a38 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1421,7 +1421,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index c80d7cfa191a0e..a3f91b06d14683 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -1374,7 +1374,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index fbefaabad5bb1f..f6ac363e2f3e98 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -1421,7 +1421,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 3c8202d4392460..7a2429dad1428c 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -1374,7 +1374,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) 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 */ 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 16f4d7247f44ac..83614e8cc918d7 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -1680,7 +1680,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 3c51bf0b1bdf73..a54445b68294e6 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 @@ -1126,7 +1126,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) 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 */ diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 650458149c4620..0220deb75b9797 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -1432,7 +1432,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index 281f19877b8eab..da021c44546d03 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -1164,7 +1164,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index 74ab5d744a5702..f2c759e8f7fe70 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -1224,7 +1224,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/lock-app/silabs/data_model/lock-app.matter b/examples/lock-app/silabs/data_model/lock-app.matter index 8a7695c75d6c87..ee3cc824b79d14 100644 --- a/examples/lock-app/silabs/data_model/lock-app.matter +++ b/examples/lock-app/silabs/data_model/lock-app.matter @@ -1432,7 +1432,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 fbc5c3625aad5f..bf5f45f4027a80 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 @@ -990,7 +990,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) 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. */ 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 4847e0ff9e22c2..4e3c7d01aa0bc4 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 @@ -896,7 +896,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) 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 */ 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 7538f304f356d4..9619f70767810d 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 @@ -1097,7 +1097,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ 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 5269b6e7094558..2c4f638037a3f2 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 @@ -1249,7 +1249,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 9daced64e142bd..6bc47afef7015b 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -2125,7 +2125,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index e81c96d55c248c..9b116eb8ba7780 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -2082,7 +2082,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index d4ac8e35a3c9b2..a07feba84c3886 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -1318,7 +1318,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) 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 */ 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 7d730d759c139a..c56d83fc2bc844 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.matter +++ b/examples/pump-app/silabs/data_model/pump-thread-app.matter @@ -1318,7 +1318,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) 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 */ 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 7d730d759c139a..c56d83fc2bc844 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.matter +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.matter @@ -1318,7 +1318,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) 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 */ 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 a7c2ebcd0fbbdf..c4d91f94c05faf 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 @@ -1193,7 +1193,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) 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 */ diff --git a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter index f3149e01afe4c9..b99237cdfd6036 100644 --- a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter +++ b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter @@ -922,7 +922,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) 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. */ diff --git a/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.matter b/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.matter index 38c88d543ec6a2..838776ac2a823b 100644 --- a/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.matter +++ b/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.matter @@ -1172,7 +1172,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) 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 */ diff --git a/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.matter b/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.matter index acb85ae85a4066..530f00d32fd7ab 100644 --- a/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.matter +++ b/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.matter @@ -1172,7 +1172,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) 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. */ diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index 0db897b3f7bd23..512f54cfd7fe52 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -993,7 +993,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ 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 d4d7f8c93ed3c9..3bd4cae0d926b7 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 @@ -1483,7 +1483,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 17ab13992cbdc3..75105aaad3c7da 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -1123,7 +1123,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/thermostat/nxp/zap/thermostat_matter_br.matter b/examples/thermostat/nxp/zap/thermostat_matter_br.matter index 8a8d69fce64421..1ba87a1fbd58b5 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_br.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_br.matter @@ -1197,7 +1197,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index a2a2f2d93acd05..af687b2ba11bcb 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -1197,7 +1197,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index b5b24560e31cd1..825a527c59b155 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -1197,7 +1197,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter index 86383cf90492b8..96ed93bd8c07b9 100644 --- a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter +++ b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter @@ -1321,7 +1321,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 1c062da0fecabc..03428f294324cf 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -1382,7 +1382,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 4aa0db4a702334..b1ef02cd5aa47f 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 @@ -896,7 +896,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) 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 */ diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 3cf472ee1de91c..1023de099d4976 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -1617,7 +1617,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 b1f1cb4916fed1..d02a997c5e7487 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 @@ -1361,7 +1361,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 1ae60c5b6c6c25..ad1da15819866d 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 @@ -1585,7 +1585,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ 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 index 5d4d31b28f4e41..cb185ad5ea10a8 100644 --- 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 @@ -1346,7 +1346,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 850b8f047ef83d..c0b7cbd37dd69e 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -1462,7 +1462,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h index cea3c62600180c..8e2e0ca373a86c 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h @@ -373,6 +373,7 @@ 0x00000031, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 0x00000031, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ 0x00000033, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ + 0x00000033, /* Cluster: General Diagnostics, Command: PayloadTestRequest, Privilege: manage */ \ 0x00000034, /* Cluster: Software Diagnostics, Command: ResetWatermarks, Privilege: manage */ \ 0x00000035, /* Cluster: Thread Network Diagnostics, Command: ResetCounts, Privilege: manage */ \ 0x00000037, /* Cluster: Ethernet Network Diagnostics, Command: ResetCounts, Privilege: manage */ \ @@ -424,6 +425,7 @@ 0x00000006, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 0x00000008, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ 0x00000000, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ + 0x00000003, /* Cluster: General Diagnostics, Command: PayloadTestRequest, Privilege: manage */ \ 0x00000000, /* Cluster: Software Diagnostics, Command: ResetWatermarks, Privilege: manage */ \ 0x00000000, /* Cluster: Thread Network Diagnostics, Command: ResetCounts, Privilege: manage */ \ 0x00000000, /* Cluster: Ethernet Network Diagnostics, Command: ResetCounts, Privilege: manage */ \ @@ -475,6 +477,7 @@ chip::Access::Privilege::kAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ chip::Access::Privilege::kAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ chip::Access::Privilege::kManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ + chip::Access::Privilege::kManage, /* Cluster: General Diagnostics, Command: PayloadTestRequest, Privilege: manage */ \ chip::Access::Privilege::kManage, /* Cluster: Software Diagnostics, Command: ResetWatermarks, Privilege: manage */ \ chip::Access::Privilege::kManage, /* Cluster: Thread Network Diagnostics, Command: ResetCounts, Privilege: manage */ \ chip::Access::Privilege::kManage, /* Cluster: Ethernet Network Diagnostics, Command: ResetCounts, Privilege: manage */ \ diff --git a/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml index c3bae609c66a21..ac628ffcede887 100644 --- a/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml @@ -151,7 +151,7 @@ limitations under the License. - + Request a variable length payload response. @@ -159,9 +159,10 @@ limitations under the License. + - + Response for the PayloadTestRequest command. diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 35b85ec5ffbd77..aa2707931f36d6 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -1990,7 +1990,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ From 4ae6882682c403581294f80df59d35f73821cd15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Tue, 17 Dec 2024 19:07:09 +0100 Subject: [PATCH 62/72] Update paths.py (#36852) Fix the path to the documentation file. --- scripts/spec_xml/paths.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/spec_xml/paths.py b/scripts/spec_xml/paths.py index 3a5159cc514bf1..d4e269759f17f2 100644 --- a/scripts/spec_xml/paths.py +++ b/scripts/spec_xml/paths.py @@ -71,7 +71,7 @@ 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') + documentation_file = os.path.join(chip_root, 'docs', 'ids_and_codes', 'spec_clusters.md') if not os.path.exists(documentation_file): raise FileNotFoundError(f"Documentation file does not exist: {documentation_file}") return documentation_file From dbb08f51b596e58c2622b39b20d454a6e94d04a6 Mon Sep 17 00:00:00 2001 From: BoB13-Matter Date: Wed, 18 Dec 2024 03:27:00 +0900 Subject: [PATCH 63/72] Fix Global Buffer Overflow in AudioOutputManager.cpp (#36858) --- .../tv-common/clusters/audio-output/AudioOutputManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/tv-app/tv-common/clusters/audio-output/AudioOutputManager.cpp b/examples/tv-app/tv-common/clusters/audio-output/AudioOutputManager.cpp index 77a1e2111b44be..4a2a1a0609c448 100644 --- a/examples/tv-app/tv-common/clusters/audio-output/AudioOutputManager.cpp +++ b/examples/tv-app/tv-common/clusters/audio-output/AudioOutputManager.cpp @@ -62,6 +62,11 @@ bool AudioOutputManager::HandleRenameOutput(const uint8_t & index, const chip::C { if (output.index == index) { + if (sizeof(mCharDataBuffer[index]) < name.size()) + { + return audioOutputRenamed; + } + audioOutputRenamed = true; memcpy(this->Data(index), name.data(), name.size()); output.name = chip::CharSpan(this->Data(index), name.size()); From b159e9c694038c06a074943b614d34dfd3a37321 Mon Sep 17 00:00:00 2001 From: BoB13-Matter Date: Wed, 18 Dec 2024 03:27:12 +0900 Subject: [PATCH 64/72] Fix Global Buffer Overflow in MediaInputManager.cpp (#36856) --- .../tv-common/clusters/media-input/MediaInputManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/tv-app/tv-common/clusters/media-input/MediaInputManager.cpp b/examples/tv-app/tv-common/clusters/media-input/MediaInputManager.cpp index 0c1dac40832e96..dd3ed3664bcd2a 100644 --- a/examples/tv-app/tv-common/clusters/media-input/MediaInputManager.cpp +++ b/examples/tv-app/tv-common/clusters/media-input/MediaInputManager.cpp @@ -99,6 +99,11 @@ bool MediaInputManager::HandleRenameInput(const uint8_t index, const chip::CharS { if (input.index == index) { + if (sizeof(mCharDataBuffer[index]) < name.size()) + { + return mediaInputRenamed; + } + mediaInputRenamed = true; memcpy(this->Data(index), name.data(), name.size()); input.name = chip::CharSpan(this->Data(index), name.size()); From 52d4406d7168320a93a9305d45d2a4a664bff788 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Tue, 17 Dec 2024 13:27:40 -0500 Subject: [PATCH 65/72] TC-IDM-10.6: Add device type revision test (#36698) * Door lock: Fix device type revisions Root node - revision 2 deprecated the power configuration cluster (not on this device) - revision 3 added MACL restrictions (not applicable to this device) Door lock - revision 2 is the matter initial revision, which is what this should have been - revision 3 changes the scenes management cluster revision, but it doesn't affect anything on the device because it's disallowed and also provisional * TC-IDM-10.6: Add device type revision test * Restyled by autopep8 --------- Co-authored-by: Restyled.io --- examples/lock-app/lock-common/lock-app.matter | 4 +- examples/lock-app/lock-common/lock-app.zap | 284 ++---------------- src/python_testing/TC_DeviceConformance.py | 44 ++- 3 files changed, 63 insertions(+), 269 deletions(-) diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 0220deb75b9797..29c096abfa96dd 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -2799,7 +2799,7 @@ cluster DoorLock = 257 { } endpoint 0 { - device type ma_rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 3; device type ma_powersource = 17, version 1; binding cluster OtaSoftwareUpdateProvider; @@ -3181,7 +3181,7 @@ endpoint 0 { } endpoint 1 { device type ma_powersource = 17, version 1; - device type ma_doorlock = 10, version 1; + device type ma_doorlock = 10, version 3; server cluster Identify { diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index cd8979532f284e..467412d7796566 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -1,6 +1,6 @@ { "fileFormat": 2, - "featureLevel": 103, + "featureLevel": 104, "creator": "zap", "keyValuePairs": [ { @@ -38,35 +38,38 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "code": 17, + "code": 22, "profileId": 259, - "label": "MA-powersource", - "name": "MA-powersource" + "label": "MA-rootdevice", + "name": "MA-rootdevice", + "deviceTypeOrder": 0 }, "deviceTypes": [ { - "code": 17, + "code": 22, "profileId": 259, - "label": "MA-powersource", - "name": "MA-powersource" + "label": "MA-rootdevice", + "name": "MA-rootdevice", + "deviceTypeOrder": 0 }, { - "code": 22, + "code": 17, "profileId": 259, - "label": "MA-rootdevice", - "name": "MA-rootdevice" + "label": "MA-powersource", + "name": "MA-powersource", + "deviceTypeOrder": 1 } ], "deviceVersions": [ - 1, + 3, 1 ], "deviceIdentifiers": [ - 17, - 22 + 22, + 17 ], - "deviceTypeName": "MA-powersource", - "deviceTypeCode": 17, + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, "deviceTypeProfileId": 259, "clusters": [ { @@ -173,22 +176,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, @@ -359,22 +346,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, @@ -817,22 +788,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, @@ -1135,22 +1090,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, @@ -1337,22 +1276,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, @@ -1582,22 +1505,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, @@ -1890,22 +1797,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, @@ -2226,22 +2117,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, @@ -4083,22 +3958,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, @@ -4383,22 +4242,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, @@ -4603,22 +4446,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, @@ -4884,24 +4711,27 @@ "code": 10, "profileId": 259, "label": "MA-doorlock", - "name": "MA-doorlock" + "name": "MA-doorlock", + "deviceTypeOrder": 0 }, "deviceTypes": [ { "code": 10, "profileId": 259, "label": "MA-doorlock", - "name": "MA-doorlock" + "name": "MA-doorlock", + "deviceTypeOrder": 0 }, { "code": 17, "profileId": 259, "label": "MA-powersource", - "name": "MA-powersource" + "name": "MA-powersource", + "deviceTypeOrder": 1 } ], "deviceVersions": [ - 1, + 3, 1 ], "deviceIdentifiers": [ @@ -5002,22 +4832,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, @@ -5172,22 +4986,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, @@ -5422,22 +5220,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, @@ -6306,22 +6088,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/src/python_testing/TC_DeviceConformance.py b/src/python_testing/TC_DeviceConformance.py index 6a8c840c648265..a7843a521105a0 100644 --- a/src/python_testing/TC_DeviceConformance.py +++ b/src/python_testing/TC_DeviceConformance.py @@ -30,7 +30,7 @@ # --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 +# --tests test_TC_IDM_10_2 test_TC_IDM_10_6 # factory-reset: true # quiet: true # === END CI TEST ARGUMENTS === @@ -273,6 +273,35 @@ def record_warning(location, problem): return success, problems + def check_device_type_revisions(self) -> tuple[bool, list[ProblemNotice]]: + success = True + problems = [] + + def record_error(location, problem): + nonlocal success + problems.append(ProblemNotice("IDM-10.6", location, ProblemSeverity.ERROR, problem, "")) + success = False + + for endpoint_id, endpoint in self.endpoints.items(): + if Clusters.Descriptor not in endpoint: + # Descriptor cluster presence checked in 10.5 + continue + + standard_device_types = [x for x in endpoint[Clusters.Descriptor] + [Clusters.Descriptor.Attributes.DeviceTypeList] if device_type_id_type(x.deviceType) == DeviceTypeIdType.kStandard] + for device_type in standard_device_types: + device_type_id = device_type.deviceType + if device_type_id not in self.xml_device_types.keys(): + # problem recorded in 10.5 + continue + expected_revision = self.xml_device_types[device_type_id].revision + actual_revision = device_type.revision + if expected_revision != actual_revision: + location = ClusterPathLocation(endpoint_id=endpoint_id, cluster_id=Clusters.Descriptor.id) + record_error( + location, f"Expected Device type revision for device type {device_type_id} {self.xml_device_types[device_type_id].name} on endpoint {endpoint_id} does not match revision on DUT. Expected: {expected_revision} DUT: {actual_revision}") + return success, problems + def check_device_type(self, fail_on_extra_clusters: bool = True, allow_provisional: bool = False) -> tuple[bool, list[ProblemNotice]]: success = True problems = [] @@ -311,13 +340,6 @@ def record_warning(location, problem): record_error(location=location, problem='Unknown device type ID in standard range') continue - if device_type_id not in self.xml_device_types.keys(): - location = DeviceTypePathLocation(device_type_id=device_type_id) - record_error(location=location, problem='Unknown device type') - continue - - # TODO: check revision. Possibly in another test? - xml_device = self.xml_device_types[device_type_id] # IDM 10.1 checks individual clusters for validity, # so here we can ignore checks for invalid and manufacturer clusters. @@ -385,6 +407,12 @@ def test_TC_IDM_10_5(self): if not success: self.fail_current_test("Problems with Device type conformance on one or more endpoints") + def test_TC_IDM_10_6(self): + success, problems = self.check_device_type_revisions() + self.problems.extend(problems) + if not success: + self.fail_current_test("Problems with Device type revisions on one or more endpoints") + if __name__ == "__main__": default_matter_test_main() From dca8f9bde5f2fcd60153d6584b7470d57d4ba14f Mon Sep 17 00:00:00 2001 From: Raul Marquez <130402456+raul-marquez-csa@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:27:48 -0800 Subject: [PATCH 66/72] [TC-SC-4.3] Discovery [DUT as Commissionee] (#31982) * Adds TC_SC_4_3.py * Fixes TXT record not available when making direct query with name and type * Fixes restyle, adds comments to operational service logic * Fix restlye for mdns class * Adds get_service_types to mdns class * Fix restyle * Steps progress * Fix restyle * Fix restyle * Adds test to tests.yaml * Fix lint * Fix lit-icd-app path in tests.yaml * Fix SII key logic * Addresses latest review comments * Fix lint * Replaces 1 sec fixed sleep in operational service logic with service listener event wait time * Merge from master * MDNS class update progress * Adds MdnsAsyncServiceInfo class * Adds get_service_by_record_type to mdns class * TC progress * Fix restyle * Fix restyle * Fix lint * Fix restyle * tests.yaml from master * tests.yaml from master * Updates steps output and test runner configs * Adds tc to tests.yaml * Update * Updates to make a fresh question each time * Update progress * Fix restyle * Fix Lint * Fix restyle * Fix lint * Adds CI task tags * Completes step 11 * Fix restyled * Steps 8,11 * Fix restyled * Adds timeout to get_service_types * Updates get_service_types description * Update src/python_testing/TC_SC_4_3.py Co-authored-by: C Freeman * Adds clarifying comment * Adds MCORE.COM PICS checks * Updates contains_ipv6_address * Removes listener dealy * Fix restyled * Fix restyled * Fix lint * Updates ipv6 check * Fixes ipv6 checks * Restore ms delay * continue * Step 9 - Updates hostname character length check, other adjustments * removes temp test file * Restyled by autopep8 * Removes test case YAML and manualTests.json reference * Fix restyle * Updates CI python test arguments * Fix typo * matter_testing import update * Update src/python_testing/TC_SC_4_3.py Co-authored-by: C Freeman * Update src/python_testing/TC_SC_4_3.py Co-authored-by: C Freeman * Update src/python_testing/TC_SC_4_3.py Co-authored-by: C Freeman * Addresses latest * Fix restyle * Testing zeroconf class imports * service info refactor * Fix restyle * Fix restyle * Updates mdns service info init * Fix restyle * Updates MdnsAsyncServiceInfo --------- Co-authored-by: C Freeman Co-authored-by: Restyled.io --- .../suites/certification/Test_TC_SC_4_3.yaml | 55 --- src/app/tests/suites/manualTests.json | 1 - src/python_testing/TC_SC_4_3.py | 407 ++++++++++++++++++ .../mdns_discovery/mdns_async_service_info.py | 135 ++++++ .../mdns_discovery/mdns_discovery.py | 181 +++++++- .../mdns_discovery/mdns_service_type_enum.py | 26 -- 6 files changed, 703 insertions(+), 102 deletions(-) delete mode 100644 src/app/tests/suites/certification/Test_TC_SC_4_3.yaml create mode 100644 src/python_testing/TC_SC_4_3.py create mode 100644 src/python_testing/mdns_discovery/mdns_async_service_info.py delete mode 100644 src/python_testing/mdns_discovery/mdns_service_type_enum.py diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_3.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_3.yaml deleted file mode 100644 index 8521cb24bc8daa..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_SC_4_3.yaml +++ /dev/null @@ -1,55 +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: 3.4.3. [TC-SC-4.3] Discovery [DUT as Commissionee] - -PICS: - - MCORE.ROLE.COMMISSIONEE - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - Chip-tool command used below are an example to verify the DUT as controller test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: - "Step 1: DUT is commissioned to TH and DUT is instructed to advertise - its operational service (_matter._tcp)." - verification: | - 1. Provision the DUT by TH (Chip-tool) - disabled: true - - - label: "Step 2: Scan for DNS-SD advertising" - PICS: - MCORE.COM.WIFI && MCORE.COM.ETH && MCORE.COM.THR && MCORE.ICD && - MCORE.SC.SII_OP_DISCOVERY_KEY && MCORE.SC.SAI_OP_DISCOVERY_KEY && - MCORE.SC.SAT_OP_DISCOVERY_KEY && MCORE.SC.T_KEY - verification: | - avahi-browse -rt _matter._tcp - - Verify the device is advertising _matterc._udp service like below output in TH terminal Log: (Verify for the DUT's actual values (like vendor ID, PID ..etc) as mentioned in the expected outcome of the test plan, The below log contains the data from the reference raspi accessory) - - + veth721e1d9 IPv6 433B62F8F07F4327-0000000000000001 _matter._tcp local - = veth721e1d9 IPv6 433B62F8F07F4327-0000000000000001 _matter._tcp local - hostname = [E45F0149AE290000.local] - address = [fe80::28e0:95ff:fed9:3085] - port = [5540] - txt = ["T=1" "SAI=300" "SII=5000"] - disabled: true diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index 4b7961b29deb01..c63714edc4317b 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -220,7 +220,6 @@ "Test_TC_SC_3_4", "Test_TC_SC_4_1", "Test_TC_SC_4_2", - "Test_TC_SC_4_3", "Test_TC_SC_4_4", "Test_TC_SC_4_5", "Test_TC_SC_4_6", diff --git a/src/python_testing/TC_SC_4_3.py b/src/python_testing/TC_SC_4_3.py new file mode 100644 index 00000000000000..e0ce02d2a58398 --- /dev/null +++ b/src/python_testing/TC_SC_4_3.py @@ -0,0 +1,407 @@ +# +# 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. +# + +# 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: ${LIT_ICD_APP} +# factory-reset: 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 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# === END CI TEST ARGUMENTS === + +import ipaddress +import logging +import re + +import chip.clusters as Clusters +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mdns_discovery.mdns_discovery import DNSRecordType, MdnsDiscovery, MdnsServiceType +from mobly import asserts +from zeroconf.const import _TYPE_AAAA, _TYPES + +''' +Purpose +The purpose of this test case is to verify that a Matter node is discoverable +and can advertise its services in a Matter network. + +Test Plan +https://github.com/CHIP-Specifications/chip-test-plans/blob/master/src/securechannel.adoc#343-tc-sc-43-discovery-dut_commissionee +''' + + +class TC_SC_4_3(MatterBaseTest): + + def steps_TC_SC_4_3(self): + return [TestStep(1, "DUT is commissioned on the same fabric as TH."), + TestStep(2, "TH reads ServerList attribute from the Descriptor cluster on EP0. ", + "If the ICD Management cluster ID (70,0x46) is present in the list, set supports_icd to true, otherwise set supports_icd to false."), + TestStep(3, + "If supports_icd is true, TH reads ActiveModeThreshold from the ICD Management cluster on EP0 and saves as active_mode_threshold.", ""), + TestStep(4, "If supports_icd is true, TH reads FeatureMap from the ICD Management cluster on EP0. If the LITS feature is set, set supports_lit to true. Otherwise set supports_lit to false.", ""), + TestStep(5, "TH constructs the instance name for the DUT as the 64-bit compressed Fabric identifier, and the assigned 64-bit Node identifier, each expressed as a fixed-length sixteen-character hexadecimal string, encoded as ASCII (UTF-8) text using capital letters, separated by a hyphen.", ""), + TestStep(6, "TH performs a query for the SRV record against the qname instance_qname.", + "Verify SRV record is returned"), + TestStep(7, "TH performs a query for the TXT record against the qname instance_qname.", + "Verify TXT record is returned"), + TestStep(8, "TH performs a query for the AAAA record against the target listed in the SRV record", + "Verify AAAA record is returned"), + TestStep(9, "TH verifies the following from the returned records:", + "TH verifies the following from the returned records: The hostname must be a fixed-length twelve-character (or sixteen-character) hexadecimal string, encoded as ASCII (UTF-8) text using capital letters.. ICD TXT key: • If supports_lit is false, verify that the ICD key is NOT present in the TXT record • If supports_lit is true, verify the ICD key IS present in the TXT record, and it has the value of 0 or 1 (ASCII) SII TXT key: • If supports_icd is true and supports_lit is false, set sit_mode to true • If supports_icd is true and supports_lit is true, set sit_mode to true if ICD=0 otherwise set sit_mode to false • If supports_icd is false, set sit_mode to false • If sit_mode is true, verify that the SII key IS present in the TXT record • if the SII key is present, verify it is a decimal value with no leading zeros and is less than or equal to 3600000 (1h in ms) SAI TXT key: • if supports_icd is true, verify that the SAI key is present in the TXT record • If the SAI key is present, verify it is a decimal value with no leading zeros and is less than or equal to 3600000 (1h in ms)"), + TestStep(10, "TH performs a DNS-SD browse for _I._sub._matter._tcp.local, where is the 64-bit compressed Fabric identifier, expressed as a fixed-length, sixteencharacter hexadecimal string, encoded as ASCII (UTF-8) text using capital letters.", + "Verify DUT returns a PTR record with DNS-SD instance name set to instance_name"), + TestStep(11, "TH performs a DNS-SD browse for _matter._tcp.local", + "Verify DUT returns a PTR record with DNS-SD instance name set to instance_name"), + ] + + ONE_HOUR_IN_MS = 3600000 + MAX_SAT_VALUE = 65535 + MAX_T_VALUE = 6 + + async def get_descriptor_server_list(self): + return await self.read_single_attribute_check_success( + endpoint=0, + dev_ctrl=self.default_controller, + cluster=Clusters.Descriptor, + attribute=Clusters.Descriptor.Attributes.ServerList + ) + + async def get_idle_mode_threshhold_ms(self): + return await self.read_single_attribute_check_success( + endpoint=0, + dev_ctrl=self.default_controller, + cluster=Clusters.IcdManagement, + attribute=Clusters.IcdManagement.Attributes.ActiveModeThreshold + ) + + async def get_icd_feature_map(self): + return await self.read_single_attribute_check_success( + endpoint=0, + dev_ctrl=self.default_controller, + cluster=Clusters.IcdManagement, + attribute=Clusters.IcdManagement.Attributes.FeatureMap + ) + + def get_dut_instance_name(self) -> str: + node_id = self.dut_node_id + compressed_fabric_id = self.default_controller.GetCompressedFabricId() + instance_name = f'{compressed_fabric_id:016X}-{node_id:016X}' + return instance_name + + def get_operational_subtype(self) -> str: + compressed_fabric_id = self.default_controller.GetCompressedFabricId() + service_name = f'_I{compressed_fabric_id:016X}._sub.{MdnsServiceType.OPERATIONAL.value}' + return service_name + + @staticmethod + def verify_decimal_value(input_value, max_value: int): + try: + input_float = float(input_value) + input_int = int(input_float) + + if str(input_value).startswith("0") and input_int != 0: + return (False, f"Input ({input_value}) has leading zeros.") + + if input_float != input_int: + return (False, f"Input ({input_value}) is not an integer.") + + if input_int <= max_value: + return (True, f"Input ({input_value}) is valid.") + else: + return (False, f"Input ({input_value}) exceeds the allowed value {max_value}.") + except ValueError: + return (False, f"Input ({input_value}) is not a valid decimal number.") + + def verify_t_value(self, t_value): + # Verify t_value is a decimal number without leading zeros and less than or equal to 6 + try: + T_int = int(t_value) + if T_int < 0 or T_int > self.MAX_T_VALUE: + return False, f"T value ({t_value}) is not in the range 0 to 6. ({t_value})" + if str(t_value).startswith("0") and T_int != 0: + return False, f"T value ({t_value}) has leading zeros." + if T_int != float(t_value): + return False, f"T value ({t_value}) is not an integer." + + # Convert to bitmap and verify bit 0 is clear + if T_int & 1 == 0: + return True, f"T value ({t_value}) is valid and bit 0 is clear." + else: + return False, f"Bit 0 is not clear. T value ({t_value})" + except ValueError: + return False, f"T value ({t_value}) is not a valid integer" + + @staticmethod + def is_ipv6_address(addresses): + if isinstance(addresses, str): + addresses = [addresses] + + for address in addresses: + try: + # Attempt to create an IPv6 address object. If successful, this is an IPv6 address. + ipaddress.IPv6Address(address) + return True, "At least one IPv6 address is present." + except ipaddress.AddressValueError: + # If an AddressValueError is raised, the current address is not a valid IPv6 address. + return False, f"Invalid IPv6 address encountered: {address}, provided addresses: {addresses}" + return False, "No IPv6 addresses found." + + @staticmethod + def extract_ipv6_address(text): + items = text.split(',') + return items[-1] + + @staticmethod + def verify_hostname(hostname: str) -> bool: + # Remove any trailing dot + if hostname.endswith('.'): + hostname = hostname[:-1] + + # Remove '.local' suffix if present + if hostname.endswith('.local'): + hostname = hostname[:-6] + + # Regular expression to match an uppercase hexadecimal string of 12 or 16 characters + pattern = re.compile(r'^[0-9A-F]{12}$|^[0-9A-F]{16}$') + return bool(pattern.match(hostname)) + + @async_test_body + async def test_TC_SC_4_3(self): + supports_icd = None + supports_lit = None + active_mode_threshold_ms = None + instance_name = None + + # *** STEP 1 *** + # DUT is commissioned on the same fabric as TH. + self.step(1) + + # *** STEP 2 *** + # TH reads from the DUT the ServerList attribute from the Descriptor cluster on EP0. If the ICD Management + # cluster ID (70,0x46) is present in the list, set supports_icd to true, otherwise set supports_icd to false. + self.step(2) + ep0_servers = await self.get_descriptor_server_list() + + # Check if ep0_servers contain the ICD Management cluster ID (0x0046) + supports_icd = Clusters.IcdManagement.id in ep0_servers + logging.info(f"supports_icd: {supports_icd}") + + # *** STEP 3 *** + # If supports_icd is true, TH reads ActiveModeThreshold from the ICD Management cluster on EP0 and saves + # as active_mode_threshold. + self.step(3) + if supports_icd: + active_mode_threshold_ms = await self.get_idle_mode_threshhold_ms() + logging.info(f"active_mode_threshold_ms: {active_mode_threshold_ms}") + + # *** STEP 4 *** + # If supports_icd is true, TH reads FeatureMap from the ICD Management cluster on EP0. If the LITS feature + # is set, set supports_lit to true. Otherwise set supports_lit to false. + self.step(4) + if supports_icd: + feature_map = await self.get_icd_feature_map() + LITS = Clusters.IcdManagement.Bitmaps.Feature.kLongIdleTimeSupport + supports_lit = bool(feature_map & LITS == LITS) + logging.info(f"kLongIdleTimeSupport set: {supports_lit}") + + # *** STEP 5 *** + # TH constructs the instance name for the DUT as the 64-bit compressed Fabric identifier, and the + # assigned 64-bit Node identifier, each expressed as a fixed-length sixteen-character hexadecimal + # string, encoded as ASCII (UTF-8) text using capital letters, separated by a hyphen. + self.step(5) + instance_name = self.get_dut_instance_name() + instance_qname = f"{instance_name}.{MdnsServiceType.OPERATIONAL.value}" + + # *** STEP 6 *** + # TH performs a query for the SRV record against the qname instance_qname. + # Verify SRV record is returned + self.step(6) + mdns = MdnsDiscovery() + operational_record = await mdns.get_service_by_record_type( + service_name=instance_qname, + service_type=MdnsServiceType.OPERATIONAL.value, + record_type=DNSRecordType.SRV, + log_output=True + ) + + # Will be used in Step 8 and 11 + # This is the hostname + hostname = operational_record.server + + # Verify SRV record is returned + srv_record_returned = operational_record is not None and operational_record.service_name == instance_qname + asserts.assert_true(srv_record_returned, "SRV record was not returned") + + # *** STEP 7 *** + # TH performs a query for the TXT record against the qname instance_qname. + # Verify TXT record is returned + self.step(7) + operational_record = await mdns.get_service_by_record_type( + service_name=instance_qname, + service_type=MdnsServiceType.OPERATIONAL.value, + record_type=DNSRecordType.TXT, + log_output=True + ) + + # Verify TXT record is returned and it contains values + txt_record_returned = operational_record.txt_record is not None and bool(operational_record.txt_record) + asserts.assert_true(txt_record_returned, "TXT record not returned or contains no values") + + # *** STEP 8 *** + # TH performs a query for the AAAA record against the target listed in the SRV record. + # Verify AAAA record is returned + self.step(8) + + quada_record = await mdns.get_service_by_record_type( + service_name=hostname, + service_type=MdnsServiceType.OPERATIONAL.value, + record_type=DNSRecordType.AAAA, + log_output=True + ) + + answer_record_type = quada_record.get_type(quada_record.type) + quada_record_type = _TYPES[_TYPE_AAAA] + + # Verify AAAA record is returned + asserts.assert_equal(hostname, quada_record.name, f"Server name mismatch: {hostname} vs {quada_record.name}") + asserts.assert_equal(quada_record_type, answer_record_type, + f"Record type should be {quada_record_type} but got {answer_record_type}") + + # # *** STEP 9 *** + # TH verifies the following from the returned records: The hostname must be a fixed-length twelve-character (or sixteen-character) + # hexadecimal string, encoded as ASCII (UTF-8) text using capital letters.. ICD TXT key: • If supports_lit is false, verify that the + # ICD key is NOT present in the TXT record • If supports_lit is true, verify the ICD key IS present in the TXT record, and it has the + # value of 0 or 1 (ASCII) SII TXT key: • If supports_icd is true and supports_lit is false, set sit_mode to true • If supports_icd is + # true and supports_lit is true, set sit_mode to true if ICD=0 otherwise set sit_mode to false • If supports_icd is false, set + # sit_mode to false • If sit_mode is true, verify that the SII key IS present in the TXT record • if the SII key is present, verify + # it is a decimal value with no leading zeros and is less than or equal to 3600000 (1h in ms) SAI TXT key: • if supports_icd is true, + # verify that the SAI key is present in the TXT record • If the SAI key is present, verify it is a decimal value with no leading + # zeros and is less than or equal to 3600000 (1h in ms) + self.step(9) + + # Verify hostname character length (12 or 16) + asserts.assert_true(self.verify_hostname(hostname=hostname), + f"Hostname for '{hostname}' is not a 12 or 16 character uppercase hexadecimal string") + + # ICD TXT KEY + if supports_lit: + logging.info("supports_lit is true, verify the ICD key IS present in the TXT record, and it has the value of 0 or 1 (ASCII).") + + # Verify the ICD key IS present + asserts.assert_in('ICD', operational_record.txt_record, "ICD key is NOT present in the TXT record.") + + # Verify it has the value of 0 or 1 (ASCII) + icd_value = int(operational_record.txt_record['ICD']) + asserts.assert_true(icd_value == 0 or icd_value == 1, "ICD value is different than 0 or 1 (ASCII).") + else: + logging.info("supports_lit is false, verify that the ICD key is NOT present in the TXT record.") + asserts.assert_not_in('ICD', operational_record.txt_record, "ICD key is present in the TXT record.") + + # SII TXT KEY + if supports_icd and not supports_lit: + sit_mode = True + + if supports_icd and supports_lit: + if icd_value == 0: + sit_mode = True + else: + sit_mode = False + + if not supports_icd: + sit_mode = False + + if sit_mode: + logging.info("sit_mode is True, verify the SII key IS present.") + asserts.assert_in('SII', operational_record.txt_record, "SII key is NOT present in the TXT record.") + + logging.info("Verify SII value is a decimal with no leading zeros and is less than or equal to 3600000 (1h in ms).") + sii_value = operational_record.txt_record['SII'] + result, message = self.verify_decimal_value(sii_value, self.ONE_HOUR_IN_MS) + asserts.assert_true(result, message) + + # SAI TXT KEY + if supports_icd: + logging.info("supports_icd is True, verify the SAI key IS present.") + asserts.assert_in('SAI', operational_record.txt_record, "SAI key is NOT present in the TXT record.") + + logging.info("Verify SAI value is a decimal with no leading zeros and is less than or equal to 3600000 (1h in ms).") + sai_value = operational_record.txt_record['SAI'] + result, message = self.verify_decimal_value(sai_value, self.ONE_HOUR_IN_MS) + asserts.assert_true(result, message) + + # SAT TXT KEY + if 'SAT' in operational_record.txt_record: + logging.info( + "SAT key is present in TXT record, verify that it is a decimal value with no leading zeros and is less than or equal to 65535.") + sat_value = operational_record.txt_record['SAT'] + result, message = self.verify_decimal_value(sat_value, self.MAX_SAT_VALUE) + asserts.assert_true(result, message) + + if supports_icd: + logging.info("supports_icd is True, verify the SAT value is equal to active_mode_threshold.") + asserts.assert_equal(int(sat_value), active_mode_threshold_ms) + + # T TXT KEY + if 'T' in operational_record.txt_record: + logging.info("T key is present in TXT record, verify if that it is a decimal value with no leading zeros and is less than or equal to 6. Convert the value to a bitmap and verify bit 0 is clear.") + t_value = operational_record.txt_record['T'] + result, message = self.verify_t_value(t_value) + asserts.assert_true(result, message) + + # AAAA + logging.info("Verify the AAAA record contains at least one IPv6 address") + ipv6_address = self.extract_ipv6_address(str(quada_record)) + result, message = self.is_ipv6_address(ipv6_address) + asserts.assert_true(result, message) + + # # *** STEP 10 *** + # TH performs a DNS-SD browse for _I._sub._matter._tcp.local, where is the 64-bit compressed + # Fabric identifier, expressed as a fixed-length, sixteencharacter hexadecimal string, encoded as ASCII (UTF-8) + # text using capital letters. Verify DUT returns a PTR record with DNS-SD instance name set to instance_name + self.step(10) + service_types = await mdns.get_service_types(log_output=True) + op_sub_type = self.get_operational_subtype() + asserts.assert_in(op_sub_type, service_types, f"No PTR record with DNS-SD instance name '{op_sub_type}' wsa found.") + + # # *** STEP 11 *** + # TH performs a DNS-SD browse for _matter._tcp.local + # Verify DUT returns a PTR record with DNS-SD instance name set to instance_name + self.step(11) + op_service_info = await mdns._get_service( + service_type=MdnsServiceType.OPERATIONAL, + log_output=True, + discovery_timeout_sec=15 + ) + + # Verify DUT returns a PTR record with DNS-SD instance name set instance_name + asserts.assert_equal(op_service_info.server, hostname, + f"No PTR record with DNS-SD instance name '{MdnsServiceType.OPERATIONAL.value}'") + asserts.assert_equal(instance_name, op_service_info.instance_name, "Instance name mismatch") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/mdns_discovery/mdns_async_service_info.py b/src/python_testing/mdns_discovery/mdns_async_service_info.py new file mode 100644 index 00000000000000..61d1dc73ebcb04 --- /dev/null +++ b/src/python_testing/mdns_discovery/mdns_async_service_info.py @@ -0,0 +1,135 @@ +# +# 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 enum +from random import randint +from typing import TYPE_CHECKING, Optional + +from zeroconf import (BadTypeInNameException, DNSOutgoing, DNSQuestion, DNSQuestionType, ServiceInfo, Zeroconf, current_time_millis, + service_type_name) +from zeroconf.const import (_CLASS_IN, _DUPLICATE_QUESTION_INTERVAL, _FLAGS_QR_QUERY, _LISTENER_TIME, _MDNS_PORT, _TYPE_A, + _TYPE_AAAA, _TYPE_SRV, _TYPE_TXT) + +_AVOID_SYNC_DELAY_RANDOM_INTERVAL = (20, 120) + + +@enum.unique +class DNSRecordType(enum.Enum): + """An MDNS record type. + + "A" - A MDNS record type + "AAAA" - AAAA MDNS record type + "SRV" - SRV MDNS record type + "TXT" - TXT MDNS record type + """ + + A = 0 + AAAA = 1 + SRV = 2 + TXT = 3 + + +class MdnsAsyncServiceInfo(ServiceInfo): + def __init__(self, name: str, type_: str) -> None: + super().__init__(type_=type_, name=name) + + if type_ and not type_.endswith(service_type_name(name, strict=False)): + raise BadTypeInNameException + + self._name = name + self.type = type_ + self.key = name.lower() + + async def async_request( + self, + zc: Zeroconf, + timeout: float, + question_type: Optional[DNSQuestionType] = None, + addr: Optional[str] = None, + port: int = _MDNS_PORT, + record_type: DNSRecordType = None + ) -> bool: + """Returns true if the service could be discovered on the + network, and updates this object with details discovered. + + This method will be run in the event loop. + + Passing addr and port is optional, and will default to the + mDNS multicast address and port. This is useful for directing + requests to a specific host that may be able to respond across + subnets. + """ + if not zc.started: + await zc.async_wait_for_start() + + now = current_time_millis() + + if TYPE_CHECKING: + assert zc.loop is not None + + first_request = True + delay = _LISTENER_TIME + next_ = now + last = now + timeout + try: + zc.async_add_listener(self, None) + while not self._is_complete: + if last <= now: + return False + if next_ <= now: + this_question_type = question_type or DNSQuestionType.QU if first_request else DNSQuestionType.QM + out: DNSOutgoing = self._generate_request_query(this_question_type, record_type) + first_request = False + + if out.questions: + zc.async_send(out, addr, port) + next_ = now + delay + next_ += randint(*_AVOID_SYNC_DELAY_RANDOM_INTERVAL) + + if this_question_type is DNSQuestionType.QM and delay < _DUPLICATE_QUESTION_INTERVAL: + delay = _DUPLICATE_QUESTION_INTERVAL + + await self.async_wait(min(next_, last) - now, zc.loop) + now = current_time_millis() + finally: + zc.async_remove_listener(self) + + return True + + def _generate_request_query(self, question_type: DNSQuestionType, record_type: DNSRecordType) -> DNSOutgoing: + """Generate the request query.""" + out = DNSOutgoing(_FLAGS_QR_QUERY) + name = self._name + qu_question = question_type is DNSQuestionType.QU + + record_types = { + DNSRecordType.SRV: (_TYPE_SRV, "Requesting MDNS SRV record..."), + DNSRecordType.TXT: (_TYPE_TXT, "Requesting MDNS TXT record..."), + DNSRecordType.A: (_TYPE_A, "Requesting MDNS A record..."), + DNSRecordType.AAAA: (_TYPE_AAAA, "Requesting MDNS AAAA record..."), + } + + # Iterate over record types, add question uppon match + for r_type, (type_const, message) in record_types.items(): + if record_type is None or record_type == r_type: + print(message) + question = DNSQuestion(name, type_const, _CLASS_IN) + question.unicast = qu_question + out.add_question(question) + + return out diff --git a/src/python_testing/mdns_discovery/mdns_discovery.py b/src/python_testing/mdns_discovery/mdns_discovery.py index f8c9d46d70760a..2d7337b622a536 100644 --- a/src/python_testing/mdns_discovery/mdns_discovery.py +++ b/src/python_testing/mdns_discovery/mdns_discovery.py @@ -15,15 +15,19 @@ # limitations under the License. # - import asyncio import json import logging from dataclasses import asdict, dataclass from enum import Enum -from typing import Dict, List, Optional - -from zeroconf import IPVersion, ServiceStateChange, Zeroconf +from time import sleep +from typing import Dict, List, Optional, Union, cast + +from mdns_discovery.mdns_async_service_info import DNSRecordType, MdnsAsyncServiceInfo +from zeroconf import IPVersion, ServiceListener, ServiceStateChange, Zeroconf +from zeroconf._dns import DNSRecord +from zeroconf._engine import AsyncListener +from zeroconf._protocol.incoming import DNSIncoming from zeroconf.asyncio import AsyncServiceBrowser, AsyncServiceInfo, AsyncZeroconfServiceTypes logger = logging.getLogger(__name__) @@ -34,9 +38,6 @@ class MdnsServiceInfo: # The unique name of the mDNS service. service_name: str - # The service type of the service, typically indicating the service protocol and domain. - service_type: str - # The instance name of the service. instance_name: str @@ -67,6 +68,9 @@ class MdnsServiceInfo: # The time-to-live value for other records associated with the service. other_ttl: int + # The service type of the service, typically indicating the service protocol and domain. + service_type: Optional[str] = None + class MdnsServiceType(Enum): """ @@ -78,6 +82,25 @@ class MdnsServiceType(Enum): BORDER_ROUTER = "_meshcop._udp.local." +class MdnsServiceListener(ServiceListener): + """ + A service listener required during mDNS service discovery + """ + + def __init__(self): + self.updated_event = asyncio.Event() + + def add_service(self, zeroconf: Zeroconf, service_type: str, name: str) -> None: + sleep(0.125) + self.updated_event.set() + + def remove_service(self, zeroconf: Zeroconf, service_type: str, name: str) -> None: + pass + + def update_service(self, zeroconf: Zeroconf, service_type: str, name: str) -> None: + self.updated_event.set() + + class MdnsDiscovery: DISCOVERY_TIMEOUT_SEC = 15 @@ -118,7 +141,7 @@ async def get_commissioner_service(self, log_output: bool = False, """ Asynchronously discovers a commissioner mDNS service within the network. - Args: + Optional args: log_output (bool): Logs the discovered services to the console. Defaults to False. discovery_timeout_sec (float): Defaults to 15 seconds. @@ -134,7 +157,7 @@ async def get_commissionable_service(self, log_output: bool = False, """ Asynchronously discovers a commissionable mDNS service within the network. - Args: + Optional args: log_output (bool): Logs the discovered services to the console. Defaults to False. discovery_timeout_sec (float): Defaults to 15 seconds. @@ -153,16 +176,19 @@ async def get_operational_service(self, """ Asynchronously discovers an operational mDNS service within the network. - Args: + Optional args: log_output (bool): Logs the discovered services to the console. Defaults to False. discovery_timeout_sec (float): Defaults to 15 seconds. - node_id: the node id to create the service name from - compressed_fabric_id: the fabric id to create the service name from + node_id: the node id to create the service name from + compressed_fabric_id: the fabric id to create the service name from Returns: Optional[MdnsServiceInfo]: An instance of MdnsServiceInfo or None if timeout reached. """ - # Validation to ensure both or none of the parameters are provided + + # Validation to ensure that both node_id and compressed_fabric_id are provided or both are None. + if (node_id is None) != (compressed_fabric_id is None): + raise ValueError("Both node_id and compressed_fabric_id must be provided together or not at all.") self._name_filter = f'{compressed_fabric_id:016x}-{node_id:016x}.{MdnsServiceType.OPERATIONAL.value}'.upper() return await self._get_service(MdnsServiceType.OPERATIONAL, log_output, discovery_timeout_sec) @@ -173,7 +199,7 @@ async def get_border_router_service(self, log_output: bool = False, """ Asynchronously discovers a border router mDNS service within the network. - Args: + Optional args: log_output (bool): Logs the discovered services to the console. Defaults to False. discovery_timeout_sec (float): Defaults to 15 seconds. @@ -188,7 +214,7 @@ async def get_all_services(self, log_output: bool = False, """ Asynchronously discovers all available mDNS services within the network. - Args: + Optional args: log_output (bool): Logs the discovered services to the console. Defaults to False. discovery_timeout_sec (float): Defaults to 15 seconds. @@ -200,6 +226,114 @@ async def get_all_services(self, log_output: bool = False, return self._discovered_services + async def get_service_types(self, log_output: bool = False, discovery_timeout_sec: float = DISCOVERY_TIMEOUT_SEC,) -> List[str]: + """ + Asynchronously discovers all available mDNS services within the network and returns a list + of the service types discovered. This method utilizes the AsyncZeroconfServiceTypes.async_find() + function to perform the network scan for mDNS services. + + Optional args: + log_output (bool): If set to True, the discovered service types are logged to the console. + This can be useful for debugging or informational purposes. Defaults to False. + discovery_timeout_sec (float): The maximum time (in seconds) to wait for the discovery process. Defaults to 10.0 seconds. + + Returns: + List[str]: A list containing the service types (str) of the discovered mDNS services. Each + element in the list is a string representing a unique type of service found during + the discovery process. + """ + try: + discovered_services = list(await asyncio.wait_for(AsyncZeroconfServiceTypes.async_find(), timeout=discovery_timeout_sec)) + except asyncio.TimeoutError: + logger.info(f"MDNS service types discovery timed out after {discovery_timeout_sec} seconds.") + discovered_services = [] + + if log_output: + logger.info(f"MDNS discovered service types: {discovered_services}") + + return discovered_services + + async def get_service_by_record_type(self, service_name: str, + record_type: DNSRecordType, + service_type: str = None, + discovery_timeout_sec: float = DISCOVERY_TIMEOUT_SEC, + log_output: bool = False + ) -> Union[Optional[MdnsServiceInfo], Optional[DNSRecord]]: + """ + Asynchronously discovers an mDNS service within the network by service name, service type, + and record type. + + Required args: + service_name (str): The unique name of the mDNS service. + Example: + C82B83803DECA0B2-0000000012344321._matter._tcp.local. + + record_type (DNSRecordType): The type of record to look for (SRV, TXT, AAAA, A). + Example: + _matterd._tcp.local. (from the MdnsServiceType enum) + + Optional args: + service_type (str): The service type of the service. Defaults to None. + log_output (bool): Logs the discovered services to the console. Defaults to False. + discovery_timeout_sec (float): Defaults to 15 seconds. + + Returns: + Union[Optional[MdnsServiceInfo], Optional[DNSRecord]]: An instance of MdnsServiceInfo, + a DNSRecord object, or None. + """ + mdns_service_info = None + + if service_type: + logger.info( + f"\nLooking for MDNS service type '{service_type}', service name '{service_name}', record type '{record_type.name}'\n") + else: + logger.info( + f"\nLooking for MDNS service with service name '{service_name}', record type '{record_type.name}'\n") + + # Adds service listener + service_listener = MdnsServiceListener() + self._zc.add_service_listener(MdnsServiceType.OPERATIONAL.value, service_listener) + + # Wait for the add/update service event or timeout + try: + await asyncio.wait_for(service_listener.updated_event.wait(), discovery_timeout_sec) + except asyncio.TimeoutError: + logger.info(f"Service lookup for {service_name} timeout ({discovery_timeout_sec}) reached without an update.") + finally: + self._zc.remove_service_listener(service_listener) + + # Prepare and perform query + service_info = MdnsAsyncServiceInfo(name=service_name, type_=service_type) + is_discovered = await service_info.async_request( + self._zc, + 3000, + record_type=record_type) + + if record_type in [DNSRecordType.A, DNSRecordType.AAAA]: + # Service type not supplied so we can + # query against the target/server + for protocols in self._zc.engine.protocols: + listener = cast(AsyncListener, protocols) + if listener.data: + dns_incoming = DNSIncoming(listener.data) + if dns_incoming.data: + answers = dns_incoming.answers() + logger.info(f"\nIncoming DNSRecord: {answers}\n") + return answers.pop(0) if answers else None + else: + # Adds service to discovered services + if is_discovered: + mdns_service_info = self._to_mdns_service_info_class(service_info) + self._discovered_services = {} + self._discovered_services[service_type] = [] + if mdns_service_info is not None: + self._discovered_services[service_type].append(mdns_service_info) + + if log_output: + self._log_output() + + return mdns_service_info + # Private methods async def _discover(self, discovery_timeout_sec: float, @@ -228,7 +362,7 @@ async def _discover(self, self._event.clear() if all_services: - self._service_types = list(await AsyncZeroconfServiceTypes.async_find()) + self._service_types = list(set(await AsyncZeroconfServiceTypes.async_find())) logger.info(f"Browsing for MDNS service(s) of type: {self._service_types}") @@ -315,8 +449,9 @@ async def _query_service_info(self, zeroconf: Zeroconf, service_type: str, servi mdns_service_info = self._to_mdns_service_info_class(service_info) if service_type not in self._discovered_services: - self._discovered_services[service_type] = [mdns_service_info] - else: + self._discovered_services[service_type] = [] + + if mdns_service_info is not None: self._discovered_services[service_type].append(mdns_service_info) elif self._verbose_logging: logger.warning("Service information not found.") @@ -336,7 +471,7 @@ def _to_mdns_service_info_class(self, service_info: AsyncServiceInfo) -> MdnsSer mdns_service_info = MdnsServiceInfo( service_name=service_info.name, service_type=service_info.type, - instance_name=service_info.get_name(), + instance_name=self._get_instance_name(service_info), server=service_info.server, port=service_info.port, addresses=service_info.parsed_addresses(), @@ -350,6 +485,12 @@ def _to_mdns_service_info_class(self, service_info: AsyncServiceInfo) -> MdnsSer return mdns_service_info + def _get_instance_name(self, service_info: AsyncServiceInfo) -> str: + if service_info.type: + return service_info.name[: len(service_info.name) - len(service_info.type) - 1] + else: + return service_info.name + async def _get_service(self, service_type: MdnsServiceType, log_output: bool, discovery_timeout_sec: float @@ -380,7 +521,7 @@ async def _get_service(self, service_type: MdnsServiceType, def _log_output(self) -> str: """ - Converts the discovered services to a JSON string and log it. + Converts the discovered services to a JSON string and logs it. The method is intended to be used for debugging or informational purposes, providing a clear and comprehensive view of all services discovered during the mDNS service discovery process. diff --git a/src/python_testing/mdns_discovery/mdns_service_type_enum.py b/src/python_testing/mdns_discovery/mdns_service_type_enum.py deleted file mode 100644 index efd77ca3beef5c..00000000000000 --- a/src/python_testing/mdns_discovery/mdns_service_type_enum.py +++ /dev/null @@ -1,26 +0,0 @@ -# -# 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. -# - - -from enum import Enum - - -class MdnsServiceType(Enum): - COMMISSIONER = "_matterd._udp.local." - COMMISSIONABLE = "_matterc._udp.local." - OPERATIONAL = "_matter._tcp.local." - BORDER_ROUTER = "_meshcop._udp.local." From 2c6c421db07460d2878be4f7ccc29d470e1278ce Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 17 Dec 2024 13:38:08 -0500 Subject: [PATCH 67/72] Make AddressResolver not keep duplicate IP addresses in its cache (#36861) * Add FAILING unit test that address resolve does dedup of inputs * Unit tests pass, but code is not YET complete * Tests still pass... * Update comments * Restyle * Include fix * Restyled by clang-format * Enforce more lookup results... this makes tests happy and also it sounds like just picking a single address by default is a bit low * Fix casts * Apparently adding mdns results increases RAM a lot and esp32 m5 does not have sufficient space. This is a bit concerning ... * Fix condition that I messed up * Update non-LL interface for the dedup logic as well * Fix includes * Fix typo * moved a bit the test guard: we have 2 tests that need 3 slots and more --------- Co-authored-by: Restyled.io Co-authored-by: Andrei Litvin --- .../AddressResolve_DefaultImpl.cpp | 39 +++-- .../tests/TestAddressResolve_DefaultImpl.cpp | 150 +++++++++++++++++- 2 files changed, 170 insertions(+), 19 deletions(-) diff --git a/src/lib/address_resolve/AddressResolve_DefaultImpl.cpp b/src/lib/address_resolve/AddressResolve_DefaultImpl.cpp index 2fc4e5a526fb65..4b60bbf6e59f28 100644 --- a/src/lib/address_resolve/AddressResolve_DefaultImpl.cpp +++ b/src/lib/address_resolve/AddressResolve_DefaultImpl.cpp @@ -19,6 +19,7 @@ #include #include +#include namespace chip { namespace AddressResolve { @@ -128,6 +129,17 @@ NodeLookupAction NodeLookupHandle::NextAction(System::Clock::Timestamp now) bool NodeLookupResults::UpdateResults(const ResolveResult & result, const Dnssd::IPAddressSorter::IpScore newScore) { + Transport::PeerAddress addressWithAdjustedInterface = result.address; + if (!addressWithAdjustedInterface.GetIPAddress().IsIPv6LinkLocal()) + { + // Only use the DNS-SD resolution's InterfaceID for addresses that are IPv6 LLA. + // For all other addresses, we should rely on the device's routing table to route messages sent. + // Forcing messages down an InterfaceId might fail. For example, in bridged networks like Thread, + // mDNS advertisements are not usually received on the same interface the peer is reachable on. + addressWithAdjustedInterface.SetInterface(Inet::InterfaceId::Null()); + ChipLogDetail(Discovery, "Lookup clearing interface for non LL address"); + } + uint8_t insertAtIndex = 0; for (; insertAtIndex < kNodeLookupResultsLen; insertAtIndex++) { @@ -138,7 +150,14 @@ bool NodeLookupResults::UpdateResults(const ResolveResult & result, const Dnssd: } auto & oldAddress = results[insertAtIndex].address; - auto oldScore = Dnssd::IPAddressSorter::ScoreIpAddress(oldAddress.GetIPAddress(), oldAddress.GetInterface()); + + if (oldAddress == addressWithAdjustedInterface) + { + // this address is already in our list. + return false; + } + + auto oldScore = Dnssd::IPAddressSorter::ScoreIpAddress(oldAddress.GetIPAddress(), oldAddress.GetInterface()); if (newScore > oldScore) { // This is a score update, it will replace a previous entry. @@ -151,6 +170,10 @@ bool NodeLookupResults::UpdateResults(const ResolveResult & result, const Dnssd: return false; } + // we are guaranteed no duplicates here: + // - insertAtIndex MUST be with some score that is `< newScore`, so all + // addresses with a `newScore` were duplicate-checked + // Move the following valid entries one level down. for (auto i = count; i > insertAtIndex; i--) { @@ -168,17 +191,9 @@ bool NodeLookupResults::UpdateResults(const ResolveResult & result, const Dnssd: count++; } - auto & updatedResult = results[insertAtIndex]; - updatedResult = result; - if (!updatedResult.address.GetIPAddress().IsIPv6LinkLocal()) - { - // Only use the DNS-SD resolution's InterfaceID for addresses that are IPv6 LLA. - // For all other addresses, we should rely on the device's routing table to route messages sent. - // Forcing messages down an InterfaceId might fail. For example, in bridged networks like Thread, - // mDNS advertisements are not usually received on the same interface the peer is reachable on. - updatedResult.address.SetInterface(Inet::InterfaceId::Null()); - ChipLogDetail(Discovery, "Lookup clearing interface for non LL address"); - } + auto & updatedResult = results[insertAtIndex]; + updatedResult = result; + updatedResult.address = addressWithAdjustedInterface; return true; } diff --git a/src/lib/address_resolve/tests/TestAddressResolve_DefaultImpl.cpp b/src/lib/address_resolve/tests/TestAddressResolve_DefaultImpl.cpp index 266939fa3f5d3b..7099414bce05a1 100644 --- a/src/lib/address_resolve/tests/TestAddressResolve_DefaultImpl.cpp +++ b/src/lib/address_resolve/tests/TestAddressResolve_DefaultImpl.cpp @@ -18,10 +18,25 @@ #include #include +#include +#include +#include using namespace chip; using namespace chip::AddressResolve; +namespace pw { + +template <> +StatusWithSize ToString(const Transport::PeerAddress & addr, pw::span buffer) +{ + char buff[Transport::PeerAddress::kMaxToStringSize]; + addr.ToString(buff); + return pw::string::Format(buffer, "IP<%s>", buff); +} + +} // namespace pw + namespace { using chip::Dnssd::IPAddressSorter::IpScore; @@ -29,13 +44,34 @@ using chip::Dnssd::IPAddressSorter::ScoreIpAddress; constexpr uint8_t kNumberOfAvailableSlots = CHIP_CONFIG_MDNS_RESOLVE_LOOKUP_RESULTS; -Transport::PeerAddress GetAddressWithLowScore(uint16_t port = CHIP_PORT, Inet::InterfaceId interfaceId = Inet::InterfaceId::Null()) +/// Get an address that should have `kUniqueLocal` (one of the lowest) priority. +/// +/// Since for various tests we check filling the cache with values, we allow +/// unique address generation by varying the `idx` parameter +/// +/// @param idx - a value to generate a unique IP address (in case we do not want dedups to happen) +/// @param port - port in case some tests would like to vary it. Required for PeerAddress +/// @param interfaceId - interface required for PeerAddress +Transport::PeerAddress GetAddressWithLowScore(uint16_t idx = 4, uint16_t port = CHIP_PORT, + Inet::InterfaceId interfaceId = Inet::InterfaceId::Null()) { // Unique Local - expect score "3" Inet::IPAddress ipAddress; - if (!Inet::IPAddress::FromString("fdff:aabb:ccdd:1::4", ipAddress)) + + auto high = static_cast(idx >> 8); + auto low = static_cast(idx & 0xFF); + + StringBuilder<64> address; + address.Add("fdff:aabb:ccdd:1::"); + if (high != 0) { - ChipLogError(NotSpecified, "!!!!!!!! IP Parse failure"); + address.AddFormat("%x:", high); + } + address.AddFormat("%x", low); + + if (!Inet::IPAddress::FromString(address.c_str(), ipAddress)) + { + ChipLogError(NotSpecified, "!!!!!!!! IP Parse failure for %s", address.c_str()); } return Transport::PeerAddress::UDP(ipAddress, port, interfaceId); } @@ -66,8 +102,60 @@ Transport::PeerAddress GetAddressWithHighScore(uint16_t port = CHIP_PORT, Inet:: return Transport::PeerAddress::UDP(ipAddress, port, interfaceId); } -TEST(TestAddressResolveDefaultImpl, TestLookupResult) +#if CHIP_CONFIG_MDNS_RESOLVE_LOOKUP_RESULTS >= 3 + +// test requires at least 3 slots: for high, medium and low +TEST(TestAddressResolveDefaultImpl, UpdateResultsDoesNotAddDuplicatesWhenFull) +{ + Impl::NodeLookupResults results; + ASSERT_EQ(results.count, 0); + + for (auto i = 0; i < kNumberOfAvailableSlots; i++) + { + ResolveResult result; + result.address = GetAddressWithLowScore(static_cast(i + 10)); + ASSERT_TRUE(results.UpdateResults(result, Dnssd::IPAddressSorter::IpScore::kUniqueLocal)); + } + ASSERT_EQ(results.count, kNumberOfAvailableSlots); + + // Adding another one should fail as there is no more room + ResolveResult result; + result.address = GetAddressWithLowScore(static_cast(5)); + ASSERT_FALSE(results.UpdateResults(result, Dnssd::IPAddressSorter::IpScore::kUniqueLocal)); + ASSERT_EQ(results.count, kNumberOfAvailableSlots); + + // however one with higher priority should work + result.address = GetAddressWithHighScore(); + ASSERT_TRUE(results.UpdateResults(result, Dnssd::IPAddressSorter::IpScore::kGlobalUnicast)); + ASSERT_EQ(results.count, kNumberOfAvailableSlots); + + // however not duplicate + ASSERT_FALSE(results.UpdateResults(result, Dnssd::IPAddressSorter::IpScore::kGlobalUnicast)); + ASSERT_EQ(results.count, kNumberOfAvailableSlots); + + // another higher priority one + result.address = GetAddressWithMediumScore(); + ASSERT_TRUE(results.UpdateResults(result, Dnssd::IPAddressSorter::IpScore::kLinkLocal)); + ASSERT_EQ(results.count, kNumberOfAvailableSlots); + + // however not duplicate + ASSERT_FALSE(results.UpdateResults(result, Dnssd::IPAddressSorter::IpScore::kLinkLocal)); + ASSERT_EQ(results.count, kNumberOfAvailableSlots); +} + +// test requires at least 3 slots: for high, medium and low +TEST(TestAddressResolveDefaultImpl, UpdateResultsDoesNotAddDuplicates) { + static_assert(Impl::kNodeLookupResultsLen >= 3, "Test uses 3 address slots"); + + Impl::NodeLookupResults results; + ASSERT_EQ(results.count, 0); + + // The order below is VERY explicit to test both before and after inserts + // - low first + // - high (to be before low) + // - medium (to be after high, even though before low) + ResolveResult lowResult; lowResult.address = GetAddressWithLowScore(); @@ -77,6 +165,49 @@ TEST(TestAddressResolveDefaultImpl, TestLookupResult) ResolveResult highResult; highResult.address = GetAddressWithHighScore(); + results.UpdateResults(lowResult, Dnssd::IPAddressSorter::IpScore::kUniqueLocal); + ASSERT_EQ(results.count, 1); + + // same address again. we should not actually insert it! + results.UpdateResults(lowResult, Dnssd::IPAddressSorter::IpScore::kUniqueLocal); + ASSERT_EQ(results.count, 1); + + // we CAN insert a different one + results.UpdateResults(highResult, Dnssd::IPAddressSorter::IpScore::kGlobalUnicast); + ASSERT_EQ(results.count, 2); + + // extra insertions of the same address should NOT make a difference + results.UpdateResults(lowResult, Dnssd::IPAddressSorter::IpScore::kUniqueLocal); + ASSERT_EQ(results.count, 2); + results.UpdateResults(highResult, Dnssd::IPAddressSorter::IpScore::kGlobalUnicast); + ASSERT_EQ(results.count, 2); + + // we CAN insert a different one + results.UpdateResults(mediumResult, Dnssd::IPAddressSorter::IpScore::kLinkLocal); + ASSERT_EQ(results.count, 3); + + // re-insertin any of these should not make a difference + results.UpdateResults(lowResult, Dnssd::IPAddressSorter::IpScore::kUniqueLocal); + ASSERT_EQ(results.count, 3); + results.UpdateResults(highResult, Dnssd::IPAddressSorter::IpScore::kGlobalUnicast); + ASSERT_EQ(results.count, 3); + results.UpdateResults(mediumResult, Dnssd::IPAddressSorter::IpScore::kLinkLocal); + ASSERT_EQ(results.count, 3); +} + +#endif + +TEST(TestAddressResolveDefaultImpl, TestLookupResult) +{ + ResolveResult lowResult; + lowResult.address = GetAddressWithLowScore(static_cast(1)); + + ResolveResult mediumResult; + mediumResult.address = GetAddressWithMediumScore(); + + ResolveResult highResult; + highResult.address = GetAddressWithHighScore(); + // Ensure test expectations regarding ordering is matched IpScore lowScore = ScoreIpAddress(lowResult.address.GetIPAddress(), Inet::InterfaceId::Null()); @@ -115,6 +246,8 @@ TEST(TestAddressResolveDefaultImpl, TestLookupResult) // Fill all the possible slots. for (auto i = 0; i < kNumberOfAvailableSlots; i++) { + // Set up UNIQUE addresses to not apply dedup here + lowResult.address = GetAddressWithLowScore(static_cast(i + 10)); handle.LookupResult(lowResult); } @@ -123,7 +256,7 @@ TEST(TestAddressResolveDefaultImpl, TestLookupResult) { EXPECT_TRUE(handle.HasLookupResult()); outResult = handle.TakeLookupResult(); - EXPECT_EQ(lowResult.address, outResult.address); + EXPECT_EQ(GetAddressWithLowScore(static_cast(i + 10)), outResult.address); } // Check that the results has been consumed properly. @@ -134,6 +267,7 @@ TEST(TestAddressResolveDefaultImpl, TestLookupResult) // Fill all the possible slots by giving it 2 times more results than the available slots. for (auto i = 0; i < kNumberOfAvailableSlots * 2; i++) { + lowResult.address = GetAddressWithLowScore(static_cast(i + 1000)); handle.LookupResult(lowResult); } @@ -142,7 +276,7 @@ TEST(TestAddressResolveDefaultImpl, TestLookupResult) { EXPECT_TRUE(handle.HasLookupResult()); outResult = handle.TakeLookupResult(); - EXPECT_EQ(lowResult.address, outResult.address); + EXPECT_EQ(GetAddressWithLowScore(static_cast(i + 1000)), outResult.address); } // Check that the results has been consumed properly. @@ -167,6 +301,7 @@ TEST(TestAddressResolveDefaultImpl, TestLookupResult) // Fill all the possible slots. for (auto i = 0; i < kNumberOfAvailableSlots; i++) { + lowResult.address = GetAddressWithLowScore(static_cast(i + 10)); handle.LookupResult(lowResult); } @@ -192,7 +327,8 @@ TEST(TestAddressResolveDefaultImpl, TestLookupResult) { EXPECT_TRUE(handle.HasLookupResult()); outResult = handle.TakeLookupResult(); - EXPECT_EQ(lowResult.address, outResult.address); + // - 2 because we start from 2 at the top for the high and medium slots + EXPECT_EQ(GetAddressWithLowScore(static_cast(i + 10 - 2)), outResult.address); } } From a9bd0ce94d0bb34a20b1fe59374b02d80cb78fb9 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Tue, 17 Dec 2024 11:26:26 -0800 Subject: [PATCH 68/72] Decouple InitDataModelHandler from libCHIP (#36725) * Decouple InitDataModelHandler from libCHIP * Use StartUp to init * Seperate namespace cleanup out * Mock function for linking * Restyled by clang-format * Add API comment * Fix mutiple defination conflicts * Address review comments * Restyled by whitespace * Seperate InitDataModel out * Revert "Seperate InitDataModel out" This reverts commit 5a8af59841ed4eb0bc573ba877d5ade7f31aa212. * Do not directly manipulate the base class's Startup method * Address review comment * Restyled by whitespace * Adjust the init order * Restyled by whitespace * Update src/app/server/Server.cpp Co-authored-by: Boris Zbarsky * Update src/controller/CHIPDeviceControllerFactory.cpp Co-authored-by: Boris Zbarsky * Add TODO comment * documented/named InitDataModel to make it clear that this is a temporary hack for a test --------- Co-authored-by: Restyled.io Co-authored-by: Boris Zbarsky --- src/app/server/Server.cpp | 30 ++++++++++--------- .../tests/TestCommissioningWindowManager.cpp | 3 -- src/app/tests/TestInteractionModelEngine.cpp | 2 +- src/app/tests/test-ember-api.cpp | 3 ++ .../CHIPDeviceControllerFactory.cpp | 10 ++----- .../tests/TestServerCommandDispatch.cpp | 18 +++++++++++ .../tests/data_model/DataModelFixtures.cpp | 3 ++ .../codegen/CodegenDataModelProvider.cpp | 9 ++++++ .../codegen/CodegenDataModelProvider.h | 6 ++++ .../tests/TestCodegenModelViaMocks.cpp | 3 ++ 10 files changed, 61 insertions(+), 26 deletions(-) diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 4e0df666e36e47..2e4a10a452fa9e 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #if CONFIG_NETWORK_LAYER_BLE #include @@ -170,17 +169,6 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) SuccessOrExit(err = mAttributePersister.Init(mDeviceStorage)); SetSafeAttributePersistenceProvider(&mAttributePersister); - // SetDataModelProvider() actually initializes/starts the provider. We need - // to preserve the following ordering guarantees: - // - // 1) Provider initialization (under SetDataModelProvider) happens after - // SetSafeAttributePersistenceProvider, since the provider can then use - // the safe persistence provider to implement and initialize its own attribute persistence logic. - // 2) For now, provider initialization happens before InitDataModelHandler(), which depends - // on atttribute persistence being already set up before it runs. Longer-term, the logic from - // InitDataModelHandler should just move into the codegen provider. - app::InteractionModelEngine::GetInstance()->SetDataModelProvider(initParams.dataModelProvider); - { FabricTable::InitParams fabricTableInitParams; fabricTableInitParams.storage = mDeviceStorage; @@ -302,8 +290,22 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) } #endif // CHIP_CONFIG_ENABLE_SERVER_IM_EVENT - // This initializes clusters, so should come after lower level initialization. - InitDataModelHandler(); + // SetDataModelProvider() initializes and starts the provider, which in turn + // triggers the initialization of cluster implementations. This callsite is + // critical because it ensures that cluster-level initialization occurs only + // after all necessary low-level dependencies have been set up. + // + // Ordering guarantees: + // 1) Provider initialization (under SetDataModelProvider) must happen after + // SetSafeAttributePersistenceProvider to ensure the provider can leverage + // the safe persistence provider for attribute persistence logic. + // 2) It must occur after all low-level components that cluster implementations + // might depend on have been initialized, as they rely on these components + // during their own initialization. + // + // This remains the single point of entry to ensure that all cluster-level + // initialization is performed in the correct order. + app::InteractionModelEngine::GetInstance()->SetDataModelProvider(initParams.dataModelProvider); #if defined(CHIP_APP_USE_ECHO) err = InitEchoHandler(&mExchangeMgr); diff --git a/src/app/tests/TestCommissioningWindowManager.cpp b/src/app/tests/TestCommissioningWindowManager.cpp index 7d1e22626b29dd..1fe151107707ce 100644 --- a/src/app/tests/TestCommissioningWindowManager.cpp +++ b/src/app/tests/TestCommissioningWindowManager.cpp @@ -41,9 +41,6 @@ using chip::CommissioningWindowAdvertisement; using chip::CommissioningWindowManager; using chip::Server; -// Mock function for linking -void InitDataModelHandler() {} - namespace { bool sAdminFabricIndexDirty = false; bool sAdminVendorIdDirty = false; diff --git a/src/app/tests/TestInteractionModelEngine.cpp b/src/app/tests/TestInteractionModelEngine.cpp index 30ca7d0001f01b..87aa3e3c64f58b 100644 --- a/src/app/tests/TestInteractionModelEngine.cpp +++ b/src/app/tests/TestInteractionModelEngine.cpp @@ -39,8 +39,8 @@ #if CHIP_CONFIG_PERSIST_SUBSCRIPTIONS #include #include - #endif // CHIP_CONFIG_PERSIST_SUBSCRIPTIONS + namespace { class NullReadHandlerCallback : public chip::app::ReadHandler::ManagementCallback diff --git a/src/app/tests/test-ember-api.cpp b/src/app/tests/test-ember-api.cpp index 2b630327a21897..48ab29cb53942d 100644 --- a/src/app/tests/test-ember-api.cpp +++ b/src/app/tests/test-ember-api.cpp @@ -34,3 +34,6 @@ uint16_t emberAfGetClusterServerEndpointIndex(chip::EndpointId endpoint, chip::C } return endpoint; } + +// Mock function for linking +void InitDataModelHandler() {} diff --git a/src/controller/CHIPDeviceControllerFactory.cpp b/src/controller/CHIPDeviceControllerFactory.cpp index 649c3a37408a26..3d84d0b6b35442 100644 --- a/src/controller/CHIPDeviceControllerFactory.cpp +++ b/src/controller/CHIPDeviceControllerFactory.cpp @@ -252,16 +252,10 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) chip::app::InteractionModelEngine * interactionModelEngine = chip::app::InteractionModelEngine::GetInstance(); - // Note placement of this BEFORE `InitDataModelHandler` since InitDataModelHandler may - // rely on ember (does emberAfInit() and configure which may load data from NVM). - // - // Expected forward path is that we will move move and more things inside datamodel - // provider (e.g. storage settings) so we want datamodelprovider available before - // `InitDataModelHandler`. + // Initialize the data model now that everything cluster implementations might + // depend on is initalized. interactionModelEngine->SetDataModelProvider(params.dataModelProvider); - InitDataModelHandler(); - ReturnErrorOnFailure(Dnssd::Resolver::Instance().Init(stateParams.udpEndPointManager)); if (params.enableServerInteractions) diff --git a/src/controller/tests/TestServerCommandDispatch.cpp b/src/controller/tests/TestServerCommandDispatch.cpp index 2389ce08e6baf2..f4457c0013ef34 100644 --- a/src/controller/tests/TestServerCommandDispatch.cpp +++ b/src/controller/tests/TestServerCommandDispatch.cpp @@ -126,6 +126,9 @@ CHIP_ERROR TestClusterCommandHandler::EnumerateAcceptedCommands(const ConcreteCl namespace { +// TODO:(#36837) implementing its own provider instead of using "CodegenDataModelProvider" +// TestServerCommandDispatch should provide its own dedicated data model provider rather than using CodegenDataModelProvider +// provider. This class exists solely for one specific test scenario, on a temporary basis. class DispatchTestDataModel : public CodegenDataModelProvider { public: @@ -134,6 +137,20 @@ class DispatchTestDataModel : public CodegenDataModelProvider static DispatchTestDataModel instance; return instance; } + + // The Startup method initializes the data model provider with a given context. + // This approach ensures that the test relies on a more controlled and explicit data model provider + // rather than depending on the code-generated one with undefined modifications. + CHIP_ERROR Startup(DataModel::InteractionModelContext context) override + { + ReturnErrorOnFailure(CodegenDataModelProvider::Startup(context)); + return CHIP_NO_ERROR; + } + +protected: + // Since the current unit tests do not involve any cluster implementations, we override InitDataModelForTesting + // to do nothing, thereby preventing calls to the Ember-specific InitDataModelHandler. + void InitDataModelForTesting() override {} }; class TestServerCommandDispatch : public chip::Test::AppContext @@ -144,6 +161,7 @@ class TestServerCommandDispatch : public chip::Test::AppContext AppContext::SetUp(); mOldProvider = InteractionModelEngine::GetInstance()->SetDataModelProvider(&DispatchTestDataModel::Instance()); } + void TearDown() { InteractionModelEngine::GetInstance()->SetDataModelProvider(mOldProvider); diff --git a/src/controller/tests/data_model/DataModelFixtures.cpp b/src/controller/tests/data_model/DataModelFixtures.cpp index 6cb4f114c3d1ef..d5c02b5f0d16d3 100644 --- a/src/controller/tests/data_model/DataModelFixtures.cpp +++ b/src/controller/tests/data_model/DataModelFixtures.cpp @@ -40,6 +40,9 @@ using namespace chip::app::Clusters; using namespace chip::app::Clusters::UnitTesting; using namespace chip::Protocols; +// Mock function for linking +void InitDataModelHandler() {} + namespace chip { namespace app { diff --git a/src/data-model-providers/codegen/CodegenDataModelProvider.cpp b/src/data-model-providers/codegen/CodegenDataModelProvider.cpp index b599ba1dfdc0dd..1cf34fcb2c8fbb 100644 --- a/src/data-model-providers/codegen/CodegenDataModelProvider.cpp +++ b/src/data-model-providers/codegen/CodegenDataModelProvider.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -417,6 +418,8 @@ CHIP_ERROR CodegenDataModelProvider::Startup(DataModel::InteractionModelContext } } + InitDataModelForTesting(); + return CHIP_NO_ERROR; } @@ -859,6 +862,12 @@ ConcreteCommandPath CodegenDataModelProvider::NextGeneratedCommand(const Concret return ConcreteCommandPath(before.mEndpointId, before.mClusterId, commandId); } +void CodegenDataModelProvider::InitDataModelForTesting() +{ + // Call the Ember-specific InitDataModelHandler + InitDataModelHandler(); +} + std::optional CodegenDataModelProvider::FirstDeviceType(EndpointId endpoint) { // Use the `Index` version even though `emberAfDeviceTypeListFromEndpoint` would work because diff --git a/src/data-model-providers/codegen/CodegenDataModelProvider.h b/src/data-model-providers/codegen/CodegenDataModelProvider.h index 0493272dbbff47..e3455d5ce03a1b 100644 --- a/src/data-model-providers/codegen/CodegenDataModelProvider.h +++ b/src/data-model-providers/codegen/CodegenDataModelProvider.h @@ -187,6 +187,12 @@ class CodegenDataModelProvider : public DataModel::Provider void Temporary_ReportAttributeChanged(const AttributePathParams & path) override; +protected: + // Temporary hack for a test: Initializes the data model for testing purposes only. + // This method serves as a placeholder and should NOT be used outside of specific tests. + // It is expected to be removed or replaced with a proper implementation in the future.TODO:(#36837). + virtual void InitDataModelForTesting(); + private: // Iteration is often done in a tight loop going through all values. // To avoid N^2 iterations, cache a hint of where something is positioned diff --git a/src/data-model-providers/codegen/tests/TestCodegenModelViaMocks.cpp b/src/data-model-providers/codegen/tests/TestCodegenModelViaMocks.cpp index 302d26a8941cd0..fd2165983891b5 100644 --- a/src/data-model-providers/codegen/tests/TestCodegenModelViaMocks.cpp +++ b/src/data-model-providers/codegen/tests/TestCodegenModelViaMocks.cpp @@ -75,6 +75,9 @@ using namespace chip::app::Clusters::Globals::Attributes; using chip::Protocols::InteractionModel::Status; +// Mock function for linking +void InitDataModelHandler() {} + namespace { constexpr AttributeId kAttributeIdReadOnly = 0x3001; From 1c9216276943a6643993da85f3d4b328e03b9945 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 17 Dec 2024 15:11:08 -0500 Subject: [PATCH 69/72] zap regen (#36876) Co-authored-by: Andrei Litvin --- examples/chef/devices/rootnode_heatpump_87ivjRAECh.matter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/chef/devices/rootnode_heatpump_87ivjRAECh.matter b/examples/chef/devices/rootnode_heatpump_87ivjRAECh.matter index 87ff9a38821291..ecd48d74867218 100644 --- a/examples/chef/devices/rootnode_heatpump_87ivjRAECh.matter +++ b/examples/chef/devices/rootnode_heatpump_87ivjRAECh.matter @@ -1269,7 +1269,7 @@ cluster GeneralDiagnostics = 51 { /** Take a snapshot of system time and epoch time. */ command TimeSnapshot(): TimeSnapshotResponse = 1; /** Request a variable length payload response. */ - command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } /** Commands to trigger a Node to allow a new Administrator to commission it. */ From 37fa87375ce0d56e5851e61436ec9c983335cd73 Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Wed, 18 Dec 2024 04:31:38 +0530 Subject: [PATCH 70/72] [ESP32]: Removed esp32-m5-with-rpc from the CI. (#36872) * [ESP32]: Removed esp32-m5-with-rpc from the CI. * Add esp32 with rpc and ipv6only variation to CI * Add default sdkconfig. --- .github/workflows/examples-esp32.yaml | 10 +- .vscode/tasks.json | 2 - .../esp32/sdkconfig_rpc.defaults | 92 +++++++++++++++++++ integrations/cloudbuild/smoke-test.yaml | 1 - scripts/build/BUILD.gn | 1 - scripts/build/test.py | 1 - ...tack-all-clusters-minimal-rpc-ipv6only.txt | 26 ------ 7 files changed, 101 insertions(+), 32 deletions(-) create mode 100644 examples/all-clusters-app/esp32/sdkconfig_rpc.defaults delete mode 100644 scripts/build/testdata/dry_run_esp32-m5stack-all-clusters-minimal-rpc-ipv6only.txt diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 3d3112d2972ecd..cd6a5f1225e9da 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -83,7 +83,6 @@ jobs: "./scripts/build/build_examples.py \ --enable-flashbundle \ --target esp32-m5stack-all-clusters-minimal \ - --target esp32-m5stack-all-clusters-rpc-ipv6only \ --pregen-dir ./zzz_pregenerated \ build \ --copy-artifacts-to out/artifacts \ @@ -95,6 +94,15 @@ jobs: mv scripts/tools/zap/generate.py.renamed scripts/tools/zap/generate.py - name: Build example All Clusters App(Target:ESP32C3) run: scripts/examples/esp_example.sh all-clusters-app sdkconfig.defaults.esp32c3 esp32c3 + - name: Build example All Clusters App(Target:ESP32) + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --enable-flashbundle \ + --target esp32-devkitc-all-clusters-rpc-ipv6only \ + build \ + --copy-artifacts-to out/artifacts \ + " - name: Copy aside build products run: | mkdir -p example_binaries/esp32-build diff --git a/.vscode/tasks.json b/.vscode/tasks.json index a0ae1b95fe4730..0a2b379ccb0f01 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -579,8 +579,6 @@ "esp32-devkitc-temperature-measurement", "esp32-m5stack-all-clusters", "esp32-m5stack-all-clusters-ipv6only", - "esp32-m5stack-all-clusters-rpc", - "esp32-m5stack-all-clusters-rpc-ipv6only", "infineon-psoc6-all-clusters", "infineon-psoc6-lock", "infineon-psoc6-light", diff --git a/examples/all-clusters-app/esp32/sdkconfig_rpc.defaults b/examples/all-clusters-app/esp32/sdkconfig_rpc.defaults new file mode 100644 index 00000000000000..3faf5754c82a99 --- /dev/null +++ b/examples/all-clusters-app/esp32/sdkconfig_rpc.defaults @@ -0,0 +1,92 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# Copyright (c) 2024 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. +# +# Description: +# CI uses this to select the ESP32. +# +CONFIG_IDF_TARGET="esp32" +CONFIG_IDF_TARGET_ESP32=y + +# Default to 921600 baud when flashing and monitoring device +CONFIG_ESPTOOLPY_BAUD_921600B=y +CONFIG_ESPTOOLPY_BAUD=921600 +CONFIG_ESPTOOLPY_COMPRESSED=y +CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y +CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 + +#enable BT +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y + +#enable lwip ipv6 autoconfig +CONFIG_LWIP_IPV6_AUTOCONFIG=y + +# Use a custom partition table +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" + +# Vendor and product id +CONFIG_DEVICE_VENDOR_ID=0xFFF1 +CONFIG_DEVICE_PRODUCT_ID=0x8001 + +# Main task needs a bit more stack than the default +# default is 3584, bump this up to 5k. +CONFIG_ESP_MAIN_TASK_STACK_SIZE=5120 + +# PW RPC Debug channel +CONFIG_EXAMPLE_UART_PORT_NUM=0 +CONFIG_EXAMPLE_UART_BAUD_RATE=115200 +CONFIG_EXAMPLE_UART_RXD=3 +CONFIG_EXAMPLE_UART_TXD=1 +CONFIG_ENABLE_PW_RPC=y + +# Disable shell +CONFIG_ENABLE_CHIP_SHELL=n + +# Serial Flasher config +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y +CONFIG_ESPTOOLPY_FLASHSIZE="4MB" + + +#disable Bluetooth modem sleep +#enable it may cause GPIO ISR triggers continuously +CONFIG_BTDM_CTRL_MODEM_SLEEP=n +CONFIG_BTDM_CTRL_MODEM_SLEEP_MODE_ORIG=n +CONFIG_BTDM_CTRL_LPCLK_SEL_MAIN_XTAL=n + +# Enable HKDF in mbedtls +CONFIG_MBEDTLS_HKDF_C=y + +# Build chip tests +CONFIG_BUILD_CHIP_TESTS=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y + +CONFIG_DIAG_USE_EXTERNAL_LOG_WRAP=y + +# Memory Optimizations +CONFIG_NIMBLE_MAX_CONNECTIONS=1 +CONFIG_BTDM_CTRL_BLE_MAX_CONN=1 +CONFIG_BT_NIMBLE_ROLE_CENTRAL=n +CONFIG_BT_NIMBLE_ROLE_OBSERVER=n + +# Reduce the event logging buffer to reduce the DRAM overflow +# TODO: [ESP32] Fix the DRAM overflow in esp32 apps #34717 +CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE=512 +CONFIG_EVENT_LOGGING_INFO_BUFFER_SIZE=512 +CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE=512 diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 9a48c18494406d..7725253af6c9f7 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -34,7 +34,6 @@ steps: ./scripts/build/build_examples.py --enable-flashbundle --target esp32-devkitc-light-rpc --target esp32-m5stack-all-clusters-ipv6only --target - esp32-m5stack-all-clusters-rpc-ipv6only --target esp32-m5stack-light --target esp32-m5stack-light-ipv6only --target esp32-m5stack-ota-requestor build --create-archives diff --git a/scripts/build/BUILD.gn b/scripts/build/BUILD.gn index 36b8209285576e..f5995db875efe2 100644 --- a/scripts/build/BUILD.gn +++ b/scripts/build/BUILD.gn @@ -26,7 +26,6 @@ pw_python_package("build_examples") { "testdata/dry_run_android-arm64-chip-tool.txt", "testdata/dry_run_efr32-brd4187c-light-rpc-no-version.txt", "testdata/dry_run_esp32-devkitc-light-rpc.txt", - "testdata/dry_run_esp32-m5stack-all-clusters-minimal-rpc-ipv6only.txt", "testdata/dry_run_linux-arm64-chip-tool-ipv6only-clang.txt", "testdata/dry_run_linux-arm64-ota-requestor-nodeps-ipv6only.txt", "testdata/dry_run_linux-x64-all-clusters-coverage.txt", diff --git a/scripts/build/test.py b/scripts/build/test.py index 48a7e4fe53bafc..f1488ba17b870a 100644 --- a/scripts/build/test.py +++ b/scripts/build/test.py @@ -108,7 +108,6 @@ def test_general_dry_runs(self): # build options do not change too much TARGETS = [ 'esp32-devkitc-light-rpc', - 'esp32-m5stack-all-clusters-minimal-rpc-ipv6only', 'android-arm64-chip-tool', 'nrf-nrf52840dk-pump', 'efr32-brd4187c-light-rpc-no-version', diff --git a/scripts/build/testdata/dry_run_esp32-m5stack-all-clusters-minimal-rpc-ipv6only.txt b/scripts/build/testdata/dry_run_esp32-m5stack-all-clusters-minimal-rpc-ipv6only.txt deleted file mode 100644 index 7d6977d6fc05cc..00000000000000 --- a/scripts/build/testdata/dry_run_esp32-m5stack-all-clusters-minimal-rpc-ipv6only.txt +++ /dev/null @@ -1,26 +0,0 @@ -# Commands will be run in CHIP project root. -cd "{root}" - -# Generating esp32-m5stack-all-clusters-minimal-rpc-ipv6only -mkdir -p {out}/esp32-m5stack-all-clusters-minimal-rpc-ipv6only - -cp examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults {out}/esp32-m5stack-all-clusters-minimal-rpc-ipv6only/sdkconfig.defaults - -rm -f examples/all-clusters-minimal-app/esp32/sdkconfig - -bash -c 'echo -e "\nCONFIG_DISABLE_IPV4=y\n" >>{out}/esp32-m5stack-all-clusters-minimal-rpc-ipv6only/sdkconfig.defaults' - -bash -c 'echo -e "\nCONFIG_LWIP_IPV4=n\n" >>{out}/esp32-m5stack-all-clusters-minimal-rpc-ipv6only/sdkconfig.defaults' - -bash -c 'echo -e "\nCONFIG_ESP_INSIGHTS_ENABLED=n\nCONFIG_ENABLE_ESP_INSIGHTS_TRACE=n\n" >>{out}/esp32-m5stack-all-clusters-minimal-rpc-ipv6only/sdkconfig.defaults' - -bash -c 'source $IDF_PATH/export.sh; source scripts/activate.sh; -export SDKCONFIG_DEFAULTS={out}/esp32-m5stack-all-clusters-minimal-rpc-ipv6only/sdkconfig.defaults -idf.py -C examples/all-clusters-minimal-app/esp32 -B {out}/esp32-m5stack-all-clusters-minimal-rpc-ipv6only reconfigure' - -rm -f examples/all-clusters-minimal-app/esp32/sdkconfig - -# Building esp32-m5stack-all-clusters-minimal-rpc-ipv6only -bash -c 'source $IDF_PATH/export.sh; source scripts/activate.sh; -export SDKCONFIG_DEFAULTS={out}/esp32-m5stack-all-clusters-minimal-rpc-ipv6only/sdkconfig.defaults -idf.py -C examples/all-clusters-minimal-app/esp32 -B {out}/esp32-m5stack-all-clusters-minimal-rpc-ipv6only build' From 3314bc37e942422c9b446a664c35085c45d7713c Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Tue, 17 Dec 2024 19:47:20 -0800 Subject: [PATCH 71/72] Map the return error from AppendUserLabel to RESOURCE_EXHAUSTED (#36868) * Map the return error from AppendUserLabel to RESOURCE_EXHAUSTED * Restyled by whitespace * Addressed the review comments * Update API comment to algin with implemantion --------- Co-authored-by: Restyled.io --- .../user-label-server/user-label-server.cpp | 9 ++++- .../TestUserLabelClusterConstraints.yaml | 4 +- src/include/platform/DeviceInfoProvider.h | 38 +++++++++++++++++++ 3 files changed, 48 insertions(+), 3 deletions(-) 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 0030f628097696..47a2c49f4b75a9 100644 --- a/src/app/clusters/user-label-server/user-label-server.cpp +++ b/src/app/clusters/user-label-server/user-label-server.cpp @@ -151,7 +151,14 @@ CHIP_ERROR UserLabelAttrAccess::WriteLabelList(const ConcreteDataAttributePath & ReturnErrorOnFailure(aDecoder.Decode(entry)); VerifyOrReturnError(IsValidLabelEntry(entry), CHIP_IM_GLOBAL_STATUS(ConstraintError)); - return provider->AppendUserLabel(endpoint, entry); + // Append the single user label entry + CHIP_ERROR err = provider->AppendUserLabel(endpoint, entry); + if (err == CHIP_ERROR_NO_MEMORY) + { + return CHIP_IM_GLOBAL_STATUS(ResourceExhausted); + } + + return err; } return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; diff --git a/src/app/tests/suites/TestUserLabelClusterConstraints.yaml b/src/app/tests/suites/TestUserLabelClusterConstraints.yaml index 935fe88c2b662c..ab5a53e5e9c169 100644 --- a/src/app/tests/suites/TestUserLabelClusterConstraints.yaml +++ b/src/app/tests/suites/TestUserLabelClusterConstraints.yaml @@ -85,5 +85,5 @@ tests: ] response: # When the cluster runs out of capacity to store these entries, - # we expect a FAILURE get returned. - error: FAILURE + # we expect a RESOURCE_EXHAUSTED get returned. + error: RESOURCE_EXHAUSTED diff --git a/src/include/platform/DeviceInfoProvider.h b/src/include/platform/DeviceInfoProvider.h index 59920f64d700f7..4bf1e4e0b3a1d4 100644 --- a/src/include/platform/DeviceInfoProvider.h +++ b/src/include/platform/DeviceInfoProvider.h @@ -89,8 +89,46 @@ class DeviceInfoProvider */ void SetStorageDelegate(PersistentStorageDelegate * storage); + /** + * @brief Sets the user label list for a specified endpoint. + * + * Replaces the current user label list with a new list. If the new list is smaller + * than the existing one, excess labels are deleted to free up space. + * + * @param[in] endpoint The endpoint ID associated with the user label list. + * @param[in] labelList The new list of user labels to store. + * + * @return CHIP_NO_ERROR on success. + * @return CHIP_ERROR if an error occurs. + */ CHIP_ERROR SetUserLabelList(EndpointId endpoint, const AttributeList & labelList); + + /** + * @brief Clears the user label list for a specified endpoint. + * + * Deletes all user labels associated with the given endpoint, resetting the list length to zero. + * If no previous list exists, this function has no effect. + * + * @param[in] endpoint The endpoint ID whose user label list will be cleared. + * + * @return CHIP_NO_ERROR on success or if no previous value exists. + * @return CHIP_ERROR if an error occurs during deletion. + */ CHIP_ERROR ClearUserLabelList(EndpointId endpoint); + + /** + * @brief Appends a user label to the user label list for a specified endpoint. + * + * Adds a new label to the end of the existing user label list. The list size must not + * exceed `kMaxUserLabelListLength`. If the list is full, the function returns an error. + * + * @param[in] endpoint The endpoint ID to which the user label will be added. + * @param[in] label The user label to append to the list. + * + * @return CHIP_NO_ERROR on success. + * @return CHIP_ERROR_NO_MEMORY if the list is already at its maximum size. + * @return CHIP_ERROR if an error occurs during storage. + */ CHIP_ERROR AppendUserLabel(EndpointId endpoint, const UserLabelType & label); // Iterators From b0d0614976f0fa4e17f377537023a0db594ac46e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Duda?= Date: Wed, 18 Dec 2024 07:33:44 +0100 Subject: [PATCH 72/72] [nrfconnect] Increase thread stack sizes for pigweed configuration (#36878) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit further increases the stack sizes when Pigweed logger is enabled. Signed-off-by: Łukasz Duda --- examples/chef/nrfconnect/rpc.overlay | 6 ++++-- examples/lighting-app/nrfconnect/rpc.overlay | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/chef/nrfconnect/rpc.overlay b/examples/chef/nrfconnect/rpc.overlay index e3b08a0a2a5178..ce776f2e27e000 100644 --- a/examples/chef/nrfconnect/rpc.overlay +++ b/examples/chef/nrfconnect/rpc.overlay @@ -49,6 +49,8 @@ CONFIG_LOG_OUTPUT=y # Increase zephyr tty rx buffer CONFIG_CONSOLE_GETCHAR_BUFSIZE=128 -# Increase BLE thread stack size -CONFIG_BT_RX_STACK_SIZE=2048 +# Increase thread stack sizes +CONFIG_BT_RX_STACK_SIZE=4096 +CONFIG_MAIN_STACK_SIZE=8092 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 diff --git a/examples/lighting-app/nrfconnect/rpc.overlay b/examples/lighting-app/nrfconnect/rpc.overlay index 315349a69555e2..3d74670fe1da6b 100644 --- a/examples/lighting-app/nrfconnect/rpc.overlay +++ b/examples/lighting-app/nrfconnect/rpc.overlay @@ -46,6 +46,8 @@ CONFIG_LOG_OUTPUT=y # Increase zephyr tty rx buffer CONFIG_CONSOLE_GETCHAR_BUFSIZE=128 -# Increase BLE thread stack size -CONFIG_BT_RX_STACK_SIZE=2048 +# Increase thread stack sizes +CONFIG_BT_RX_STACK_SIZE=4096 +CONFIG_MAIN_STACK_SIZE=8092 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048